We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e73309b commit b54d1d4Copy full SHA for b54d1d4
lib/mfs.js
@@ -22,7 +22,11 @@ module.exports = function (node) {
22
23
bufferStream.on('end', function () {
24
// nested, must make sure we have all the dirs along the way
25
- if (opts.key.indexOf('/')) {
+ // https://github.com/ipfs/ipfs-blob-store/pull/5#discussion_r44748249
26
+ if (opts.key[0] === '/') {
27
+ opts.key = opts.key.slice(1)
28
+ }
29
+ if (opts.key.indexOf('/') > -1) {
30
var dirPath = opts.key.split('/')
31
dirPath.pop()
32
dirPath = dirPath.join('/')
0 commit comments