mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
fix(ui): address final Greptile follow-up
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
bd6d07d0b4
commit
ad1ef6a8c6
3 changed files with 13 additions and 2 deletions
|
|
@ -228,7 +228,11 @@ export function createBufferedTextFileWriter(filePath: string, maxBufferedBytes
|
|||
stream.destroy();
|
||||
await pendingWrite.catch(() => {});
|
||||
if (existsSync(filePath)) {
|
||||
unlinkSync(filePath);
|
||||
try {
|
||||
unlinkSync(filePath);
|
||||
} catch {
|
||||
// Preserve the original backup failure if temporary file cleanup also fails.
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue