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

fix double recursive flag #110

Merged
merged 1 commit into from
Nov 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/request-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ function requestAPI (config, path, args, qs, files, buffer, cb) {
buffer = false
}

if (qs.r) qs.recursive = qs.r
if (qs.r) {
qs.recursive = qs.r
delete qs.r // From IPFS 0.4.0, it throw an error when both r and recursive are passed
}

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