Skip to content

Commit

Permalink
fix output dir (#178)
Browse files Browse the repository at this point in the history
* fix output dir

* other place
  • Loading branch information
anjor authored Oct 29, 2024
1 parent 8847406 commit 453db82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd-car-split.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func newCmd_SplitCar() *cli.Command {
return fmt.Errorf("failed to close file: %w", err)
}

err = carv2.ReplaceRootsInFile(cf.name, []cid.Cid{cf.payloadCid})
err = carv2.ReplaceRootsInFile(filepath.Join(outputDir, cf.name), []cid.Cid{cf.payloadCid})
if err != nil {
return fmt.Errorf("failed to replace root: %w", err)
}
Expand Down Expand Up @@ -378,7 +378,7 @@ func newCmd_SplitCar() *cli.Command {
return fmt.Errorf("failed to close file: %w", err)
}

err = carv2.ReplaceRootsInFile(cf.name, []cid.Cid{cf.payloadCid})
err = carv2.ReplaceRootsInFile(filepath.Join(outputDir, cf.name), []cid.Cid{cf.payloadCid})
if err != nil {
return fmt.Errorf("failed to replace root: %w", err)
}
Expand Down

0 comments on commit 453db82

Please sign in to comment.