From abbaebd6e5fa7b6ee95b84f74c80c3f1c4fd72ca Mon Sep 17 00:00:00 2001 From: Pedro Teixeira Date: Fri, 15 Dec 2017 10:13:02 +0000 Subject: [PATCH] fix: cat: remove /ipfs/ prefix if there is one --- src/core/components/files.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/components/files.js b/src/core/components/files.js index 400b515473..009e1229ad 100644 --- a/src/core/components/files.js +++ b/src/core/components/files.js @@ -296,6 +296,9 @@ function normalizePath (path) { if (Buffer.isBuffer(path)) { path = toB58String(path) } + if (path.indexOf('/ipfs/') === 0) { + path = path.substring('/ipfs/'.length) + } if (path.charAt(path.length - 1) === '/') { path = path.substring(0, path.length - 1) }