Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Always use / as file path separator
Browse files Browse the repository at this point in the history
  • Loading branch information
liuziba committed Jul 2, 2022
1 parent ba7ee3d commit 8fff5e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions spec/generate-car_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
after :each do
FileUtils.rm_f(Dir['test/*.car'])
FileUtils.rm_rf('generated_test')
FileUtils.rm_rf('subfiles_test')
FileUtils.rm_rf('tmpdir')
end
it 'should work for single file input' do
expectIpld = %{
Expand Down
2 changes: 1 addition & 1 deletion util/chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func GenerateCar(ctx context.Context, fileList []Finfo, parentPath string, tmpDi
}
node, err = BuildFileNode(ctx, item, dagServ, cidBuilder)
dagServ.Add(ctx, node)
cidMap[path] = CidMapValue{false, node.Cid().String()}
cidMap[strings.Join(filepath.SplitList(path), "/")] = CidMapValue{false, node.Cid().String()}
if err != nil {
logger.Warn(err)
return
Expand Down

0 comments on commit 8fff5e0

Please sign in to comment.