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

fix: prevent delete from sending multiple args in callback #16

Merged
merged 2 commits into from
May 28, 2018
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion ci/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
javascript()
javascript(['nodejs_versions': ['8.11.1','9.2.0','10.0.0']])
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ class FsDatastore {
*/
delete (key /* : Key */, callback /* : Callback<void> */) /* : void */ {
const parts = this._encode(key)
fs.unlink(parts.file, callback)
fs.unlink(parts.file, (err) => {
// Avoid injection of additional params, we only need the error
callback(err)
})
}

/**
Expand Down