Skip to content

Commit 954c0db

Browse files
committed
Fix OS-specific slashing without strconv
1 parent ff0d236 commit 954c0db

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/commands/add.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"io"
66
"path"
77
"path/filepath"
8-
"strconv"
98
"strings"
109

1110
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/cheggaaa/pb"
@@ -389,7 +388,7 @@ func checkForParentIgnorePatterns(givenPath string, ignoreFilePatterns []ignore.
389388

390389
// break out the absolute path
391390
dir := filepath.Dir(absolutePath)
392-
pathComponents := strings.Split(dir, strconv.QuoteRune(filepath.Separator))
391+
pathComponents := strings.Split(dir, string(filepath.Separator))
393392

394393
// We loop through each parent component attempting to find an .ipfsignore file
395394
for index, _ := range pathComponents {
@@ -400,7 +399,7 @@ func checkForParentIgnorePatterns(givenPath string, ignoreFilePatterns []ignore.
400399

401400
localIgnore, ignoreErr := ignore.CompileIgnoreFile(ignorePathname)
402401
if ignoreErr == nil && localIgnore != nil {
403-
log.Debugf("found ignore file: %s", dir)
402+
log.Debugf("found ignore file: %s", ignorePathname)
404403
ignoreFilePatterns = append(ignoreFilePatterns, *localIgnore)
405404
}
406405
}

0 commit comments

Comments
 (0)