Skip to content

Commit

Permalink
Decrease image count on upload errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed Nov 21, 2021
1 parent b14bf94 commit c2c2e8f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libs/taskNew.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ module.exports = {
saveStream = null;
}
if (fs.exists(saveTo, exists => {
params.imagesCount--;
fs.unlink(saveTo, err => {
if (err) logger.error(err);
});
Expand Down

0 comments on commit c2c2e8f

Please sign in to comment.