Skip to content

Commit

Permalink
createWriteStream: Ignore error in fs.unlinkSync
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Nov 9, 2022
1 parent cf3a752 commit 8ac939f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/fs/src/NodeFS.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ export class NodeFS implements FileSystem {

writeStream.once('error', () => {
failed = true;
fs.unlinkSync(tmpFilePath);
try {
fs.unlinkSync(tmpFilePath);
} catch (e) {
// ignore error
}
});

return writeStream;
Expand Down

0 comments on commit 8ac939f

Please sign in to comment.