diff --git a/src/core/ipfs/files.js b/src/core/ipfs/files.js index 11461c2424..29c2e3577f 100644 --- a/src/core/ipfs/files.js +++ b/src/core/ipfs/files.js @@ -44,10 +44,11 @@ module.exports = function files (self) { // Transform file info tuples to DAGNodes i.pipe(through.obj(function transform (info, enc, next) { - self._dagS.get(bs58.encode(info.multihash).toString(), (err, node) => { + const mh = bs58.encode(info.multihash).toString() + self._dagS.get(mh, (err, node) => { if (err) return callback(err) var obj = { - path: info.path, + path: info.path || mh, node: node } res.push(obj)