Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit d4f29bb

Browse files
committedNov 12, 2015
Merge pull request #110 from ipfs/fix/double-recursive-flag
fix double recursive flag
2 parents 61c8eb8 + 9b77ad3 commit d4f29bb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/request-api.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ function requestAPI (config, path, args, qs, files, buffer, cb) {
9494
buffer = false
9595
}
9696

97-
if (qs.r) qs.recursive = qs.r
97+
if (qs.r) {
98+
qs.recursive = qs.r
99+
delete qs.r // From IPFS 0.4.0, it throw an error when both r and recursive are passed
100+
}
98101

99102
if (!isNode && qs.recursive && path === 'add') {
100103
return cb(new Error('Recursive uploads are not supported in the browser'))

0 commit comments

Comments
 (0)
This repository has been archived.