Skip to content

Commit a1b28da

Browse files
authored
Merge pull request ipfs#178 from ipfs/fix/16
fix: use filepath when handling OS paths
2 parents 96503ab + e0d86c9 commit a1b28da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

add.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"errors"
77
"io"
88
"os"
9-
"path"
9+
"path/filepath"
1010

1111
"github.com/ipfs/go-ipfs-files"
1212
)
@@ -90,7 +90,7 @@ func (s *Shell) AddDir(dir string) (string, error) {
9090
if err != nil {
9191
return "", err
9292
}
93-
slf := files.NewSliceDirectory([]files.DirEntry{files.FileEntry(path.Base(dir), sf)})
93+
slf := files.NewSliceDirectory([]files.DirEntry{files.FileEntry(filepath.Base(dir), sf)})
9494
reader := files.NewMultiFileReader(slf, true)
9595

9696
resp, err := s.Request("add").

0 commit comments

Comments
 (0)