fix(ui): address final Greptile follow-up

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
dotta 2026-04-02 12:21:35 -05:00
parent bd6d07d0b4
commit ad1ef6a8c6
3 changed files with 13 additions and 2 deletions

View file

@ -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.
}
}
},
};