From ea9ecf2dbfa035428d4754130491a2dcf2c14c29 Mon Sep 17 00:00:00 2001 From: Logan <4197432+lsnow99@users.noreply.github.com> Date: Sun, 7 Aug 2022 21:22:34 -0400 Subject: [PATCH] fix for windows --- cmd/dudu/main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/dudu/main.go b/cmd/dudu/main.go index 3f556b1..8e20574 100644 --- a/cmd/dudu/main.go +++ b/cmd/dudu/main.go @@ -10,7 +10,7 @@ import ( "net/http" "os" "os/signal" - "path/filepath" + "path" "strconv" "strings" "sync" @@ -21,7 +21,7 @@ import ( "gopkg.in/fsnotify.v1" ) -const tempDir = "./.dudu" +const tempDir = ".dudu" // Version of dudu var Version string @@ -228,14 +228,14 @@ func populateProject(projectName, rootFolder string) { } for _, entry := range entries { - fullName := filepath.Join(rootFolder, entry.Name()) + fullName := path.Join(rootFolder, entry.Name()) if entry.IsDir() { populateProject(projectName, fullName) } else { // Create directory structure - relName := filepath.Join(strings.Split(fullName, string(os.PathSeparator))[1:]...) - outFile := filepath.Join(projectName, relName) - outPath, _ := filepath.Split(outFile) + relName := path.Join(strings.Split(fullName, string(os.PathSeparator))[1:]...) + outFile := path.Join(projectName, relName) + outPath, _ := path.Split(outFile) if err := os.MkdirAll(outPath, 0700); err != nil { log.Println("error:", err)