From 8e9a4778ceb1aca19dd43d556eba32d3628d1ba8 Mon Sep 17 00:00:00 2001 From: gatesvp Date: Thu, 14 May 2015 00:52:18 -0700 Subject: [PATCH] Fix OS-specific slashing without strconv --- core/commands/add.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/commands/add.go b/core/commands/add.go index 151cf979caa..72cd4e619c2 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -5,7 +5,6 @@ import ( "io" "path" "path/filepath" - "strconv" "strings" "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/cheggaaa/pb" @@ -389,7 +388,7 @@ func checkForParentIgnorePatterns(givenPath string, ignoreFilePatterns []ignore. // break out the absolute path dir := filepath.Dir(absolutePath) - pathComponents := strings.Split(dir, strconv.QuoteRune(filepath.Separator)) + pathComponents := strings.Split(dir, string(filepath.Separator)) // We loop through each parent component attempting to find an .ipfsignore file for index, _ := range pathComponents { @@ -400,7 +399,7 @@ func checkForParentIgnorePatterns(givenPath string, ignoreFilePatterns []ignore. localIgnore, ignoreErr := ignore.CompileIgnoreFile(ignorePathname) if ignoreErr == nil && localIgnore != nil { - log.Debugf("found ignore file: %s", dir) + log.Debugf("found ignore file: %s", ignorePathname) ignoreFilePatterns = append(ignoreFilePatterns, *localIgnore) } }