Skip to content

Commit

Permalink
remove path usage
Browse files Browse the repository at this point in the history
  • Loading branch information
lsnow99 committed Aug 8, 2022
1 parent d4fb501 commit 03191d5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/dudu/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"net/http"
"os"
"os/signal"
"path"
"path/filepath"
"strconv"
"strings"
Expand Down Expand Up @@ -229,13 +228,13 @@ func populateProject(projectName, rootFolder string) {
}

for _, entry := range entries {
fullName := path.Join(rootFolder, entry.Name())
fullName := filepath.Join(rootFolder, entry.Name())
if entry.IsDir() {
populateProject(projectName, fullName)
} else {
// Create directory structure
relName := path.Join(strings.Split(fullName, string(os.PathSeparator))[1:]...)
outFile := path.Join(projectName, relName)
relName := filepath.Join(strings.Split(fullName, string(os.PathSeparator))[1:]...)
outFile := filepath.Join(projectName, relName)
outPath, _ := filepath.Split(outFile)

if err := os.MkdirAll(outPath, 0700); err != nil {
Expand Down

0 comments on commit 03191d5

Please sign in to comment.