From 6b63596b3928609bfe9ef31264404b20ef1243e8 Mon Sep 17 00:00:00 2001 From: xieshuang Date: Thu, 7 Nov 2024 12:55:33 +0800 Subject: [PATCH] safe to rm temp file --- src/background/PatchFile/PatchFile.base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/background/PatchFile/PatchFile.base.ts b/src/background/PatchFile/PatchFile.base.ts index f7d30fa..ac8afa0 100644 --- a/src/background/PatchFile/PatchFile.base.ts +++ b/src/background/PatchFile/PatchFile.base.ts @@ -135,7 +135,7 @@ export abstract class AbsPatchFile { await vscode.window.showErrorMessage(e.message); return false; } finally { - await fs.promises.rm(tempFilePath); + await fs.promises.rm(tempFilePath, { force: true }); } } }