diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-02-16 22:14:40 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-02-16 22:14:40 +0100 |
commit | 1ac00554c3b5f88d2ddc2e28e7cfcdcad9d9f4bb (patch) | |
tree | be07a89623f7a6b39372550d3bc68cb9c2741662 | |
parent | a9896315a1b37b66865a0eb7e94e768ef45ff3db (diff) | |
parent | 0d4d81e597d541e9f0639f2a0fb5249bf8b5faaa (diff) | |
download | go-git-1ac00554c3b5f88d2ddc2e28e7cfcdcad9d9f4bb.tar.gz |
Merge pull request #27 from scjalliance/windows-compatibility
File paths will now be consistent across platforms
-rw-r--r-- | tree.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5,7 +5,7 @@ import ( "errors" "io" "os" - "path/filepath" + "path" "strconv" "strings" @@ -138,14 +138,14 @@ func (t *Tree) walkEntries(base string, ch chan *File) { if obj.Type() == core.TreeObject { tree := &Tree{r: t.r} tree.Decode(obj) - tree.walkEntries(filepath.Join(base, entry.Name), ch) + tree.walkEntries(path.Join(base, entry.Name), ch) continue } blob := &Blob{} blob.Decode(obj) - ch <- &File{Name: filepath.Join(base, entry.Name), Reader: blob.Reader(), Hash: entry.Hash} + ch <- &File{Name: path.Join(base, entry.Name), Reader: blob.Reader(), Hash: entry.Hash} } } |