diff --git a/package.json b/package.json index 7c26730137..cf0155a2f7 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "eslint-plugin-react": "^7.11.1", "go-ipfs-dep": "~0.4.18", "gulp": "^3.9.1", - "interface-ipfs-core": "~0.92.0", + "interface-ipfs-core": "~0.93.0", "ipfsd-ctl": "~0.40.0", "nock": "^10.0.2", "pull-stream": "^3.6.9", diff --git a/src/files-regular/ls-pull-stream.js b/src/files-regular/ls-pull-stream.js index a647825fc0..c82d54f62c 100644 --- a/src/files-regular/ls-pull-stream.js +++ b/src/files-regular/ls-pull-stream.js @@ -3,6 +3,7 @@ const moduleConfig = require('../utils/module-config') const pull = require('pull-stream') const deferred = require('pull-defer') +const IsIpfs = require('is-ipfs') const cleanCID = require('../utils/clean-cid') module.exports = (arg) => { @@ -17,7 +18,9 @@ module.exports = (arg) => { try { args = cleanCID(args) } catch (err) { - return callback(err) + if (!IsIpfs.ipfsPath(args)) { + return callback(err) + } } const p = deferred.source() diff --git a/src/files-regular/ls-readable-stream.js b/src/files-regular/ls-readable-stream.js index c249f5b64e..7ee980e314 100644 --- a/src/files-regular/ls-readable-stream.js +++ b/src/files-regular/ls-readable-stream.js @@ -2,6 +2,7 @@ const moduleConfig = require('../utils/module-config') const Stream = require('readable-stream') +const IsIpfs = require('is-ipfs') const cleanCID = require('../utils/clean-cid') module.exports = (arg) => { @@ -16,7 +17,9 @@ module.exports = (arg) => { try { args = cleanCID(args) } catch (err) { - return callback(err) + if (!IsIpfs.ipfsPath(args)) { + return callback(err) + } } const pt = new Stream.PassThrough({ objectMode: true }) diff --git a/src/files-regular/ls.js b/src/files-regular/ls.js index 67549ecd8b..8fbc2d16e6 100644 --- a/src/files-regular/ls.js +++ b/src/files-regular/ls.js @@ -1,6 +1,7 @@ 'use strict' const promisify = require('promisify-es6') +const IsIpfs = require('is-ipfs') const moduleConfig = require('../utils/module-config') const cleanCID = require('../utils/clean-cid') @@ -16,7 +17,9 @@ module.exports = (arg) => { try { args = cleanCID(args) } catch (err) { - return callback(err) + if (!IsIpfs.ipfsPath(args)) { + return callback(err) + } } send({