Skip to content

Commit

Permalink
Fix for #870
Browse files Browse the repository at this point in the history
Thanks to  @Gobliins for reporting
  • Loading branch information
dr-dimitru committed Apr 28, 2023
1 parent 6a62e96 commit 36f9fe4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1430,11 +1430,11 @@ class FilesCollection extends FilesCollectionCore {
wStream.destroy();
}

fs.remove(opts.path, (removeError) => {
fs.unlink(opts.path, (unlinkError) => {
bound(() => {
callback && callback(error);
if (removeError) {
this._debug(`[FilesCollection] [load] [fetch(${url})] [fs.remove(${opts.path})] removeError:`, removeError);
if (unlinkError) {
this._debug(`[FilesCollection] [load] [fetch(${url})] [fs.unlink(${opts.path})] unlinkError:`, unlinkError);
}
});
});
Expand Down

0 comments on commit 36f9fe4

Please sign in to comment.