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

Commit

Permalink
fix: cat: for when the ipfs path is a buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed Dec 14, 2017
1 parent f6c15c6 commit b5c7c41
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 @@ -293,6 +293,9 @@ module.exports = function files (self) {
}

function normalizePath (path) {
if (Buffer.isBuffer(path)) {
path = toB58String(path)
}
if (path.charAt(path.length - 1) === '/') {
path = path.substring(0, path.length - 1)
}
Expand Down

0 comments on commit b5c7c41

Please sign in to comment.