Skip to content

Commit

Permalink
Respect file path separator on all OSes
Browse files Browse the repository at this point in the history
  • Loading branch information
gatesvp committed May 14, 2015
1 parent f04ac6f commit 7f818e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io"
"path"
"path/filepath"
"strconv"
"strings"

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

// break out the absolute path
dir := filepath.Dir(absolutePath)
pathComponents := strings.Split(dir, "\\")
pathComponents := strings.Split(dir, strconv.QuoteRune(filepath.Separator))

// We loop through each parent component attempting to find an .ipfsignore file
for index, _ := range pathComponents {
Expand Down

0 comments on commit 7f818e2

Please sign in to comment.