This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
jsipfs fails with error when adding directory with trailing slash #954
Closed
Description
- Version:
js-ipfs version: 0.25.1
- Platform:
OSX 10.12.6
- Subsystem:
Type:
Bug
Severity:
Medium
Description:
jsipfs add -r crashes when adding a directory ending with /
jsipfs add -r src/
/Users/rklaehn/.config/yarn/global/node_modules/ipfs/src/cli/commands/files/add.js:69
throw err
^
Error: [object Object]
at parseError (/Users/rklaehn/.config/yarn/global/node_modules/ipfs-api/src/utils/request-api.js:17:17)
at ClientRequest.<anonymous> (/Users/rklaehn/.config/yarn/global/node_modules/ipfs-api/src/utils/request-api.js:39:14)
at Object.onceWrapper (events.js:316:30)
at emitOne (events.js:115:13)
at ClientRequest.emit (events.js:210:7)
at HTTPParser.parserOnIncomingClient (_http_client.js:564:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
at Socket.socketOnData (_http_client.js:453:20)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
Steps to reproduce the error:
Add a directory ending with /, e.g. src/
Expected behaviour
Fail with a meaningful error message.