Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
fix(put-stream): remove tmp file on stream insert error
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Mar 2, 2017
1 parent 09d5e14 commit 65f6632
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/content/put-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function pipeToTmp (inputStream, cache, tmpTarget, opts, errCheck) {
pipe(inputStream, hashStream, outStream, err => {
errCheck()
if (err) {
reject(err)
rimraf(tmpTarget).then(() => reject(err), reject)
} else {
resolve(digest)
}
Expand Down

0 comments on commit 65f6632

Please sign in to comment.