Skip to content

Commit

Permalink
fix: bad merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Jan 24, 2020
1 parent 08d8d9f commit 714e540
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/components/add/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,15 @@ function transformFile (opts) {
cid = cid.toV1()
}

const hash = cid.toBaseEncodedString()
let path = file.path ? file.path : hash
let path = file.path ? file.path : cid.toString()

if (opts.wrapWithDirectory && !file.path) {
path = ''
}

yield {
path,
hash,
cid,
size: file.size,
mode: file.unixfs && file.unixfs.mode,
mtime: file.unixfs && file.unixfs.mtime
Expand Down

0 comments on commit 714e540

Please sign in to comment.