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

Commit

Permalink
fix: cat: remove /ipfs/ prefix if there is one
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed Dec 15, 2017
1 parent b5c7c41 commit abbaebd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/components/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit abbaebd

Please sign in to comment.