Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 1ac0055

Browse files
committed
Merge pull request #27 from scjalliance/windows-compatibility
File paths will now be consistent across platforms
2 parents a989631 + 0d4d81e commit 1ac0055

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tree.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"errors"
66
"io"
77
"os"
8-
"path/filepath"
8+
"path"
99
"strconv"
1010
"strings"
1111

@@ -138,14 +138,14 @@ func (t *Tree) walkEntries(base string, ch chan *File) {
138138
if obj.Type() == core.TreeObject {
139139
tree := &Tree{r: t.r}
140140
tree.Decode(obj)
141-
tree.walkEntries(filepath.Join(base, entry.Name), ch)
141+
tree.walkEntries(path.Join(base, entry.Name), ch)
142142
continue
143143
}
144144

145145
blob := &Blob{}
146146
blob.Decode(obj)
147147

148-
ch <- &File{Name: filepath.Join(base, entry.Name), Reader: blob.Reader(), Hash: entry.Hash}
148+
ch <- &File{Name: path.Join(base, entry.Name), Reader: blob.Reader(), Hash: entry.Hash}
149149
}
150150
}
151151

0 commit comments

Comments
 (0)