Skip to content

Commit

Permalink
fix (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
anjor authored May 1, 2023
1 parent d17d239 commit 5b982a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/data-prep/fil-data-prep/fil-data-prep.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ func filDataPrep(c *cli.Context) error {
tr := constructTree(files, rs)
nodes := getDirectoryNodes(tr)

if len(paths) > 1 {
if len(nodes) == 1 || len(paths) > 1 { // len(nodes) = 1 means a file was passed as input
rcid = nodes[0].Cid() // use fake root directory if multiple args
writeNode(nodes, wout)
} else {
rcid = nodes[1].Cid() // otherwise use the first node (which should work) todo: check this
rcid = nodes[1].Cid() // otherwise use the first node (which should work)
writeNode(nodes[1:], wout)
}
}()
Expand Down

0 comments on commit 5b982a5

Please sign in to comment.