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 e8d8642 commit ff0d236
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 ff0d236

Please sign in to comment.