Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit abbaebd

Browse files
committed
fix: cat: remove /ipfs/ prefix if there is one
1 parent b5c7c41 commit abbaebd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/components/files.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ function normalizePath (path) {
296296
if (Buffer.isBuffer(path)) {
297297
path = toB58String(path)
298298
}
299+
if (path.indexOf('/ipfs/') === 0) {
300+
path = path.substring('/ipfs/'.length)
301+
}
299302
if (path.charAt(path.length - 1) === '/') {
300303
path = path.substring(0, path.length - 1)
301304
}

0 commit comments

Comments
 (0)