Skip to content

Commit

Permalink
fix for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lsnow99 authored Aug 8, 2022
1 parent 03191d5 commit ea9ecf2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/dudu/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"net/http"
"os"
"os/signal"
"path/filepath"
"path"
"strconv"
"strings"
"sync"
Expand All @@ -21,7 +21,7 @@ import (
"gopkg.in/fsnotify.v1"
)

const tempDir = "./.dudu"
const tempDir = ".dudu"

// Version of dudu
var Version string
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ea9ecf2

Please sign in to comment.