Skip to content

Commit 9118756

Browse files
Akos Kittakittaakos
Akos Kitta
authored andcommitted
Do not bail when wiping the temp sketch has failed
Signed-off-by: Akos Kitta <[email protected]>
1 parent 113fe38 commit 9118756

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: arduino-ide-extension/src/browser/contributions/save-as-sketch.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ export class SaveAsSketch extends SketchContribution {
6161
const workspaceUri = await this.sketchService.copy(sketch, { destinationUri });
6262
if (workspaceUri && openAfterMove) {
6363
if (wipeOriginal || (openAfterMove && execOnlyIfTemp)) {
64-
await this.fileService.delete(new URI(sketch.uri), { recursive: true });
64+
try {
65+
await this.fileService.delete(new URI(sketch.uri), { recursive: true });
66+
} catch { /* NOOP: from time to time, it's not possible to wipe the old resource from the temp dir on Windows */ }
6567
}
6668
this.workspaceService.open(new URI(workspaceUri), { preserveWindow: true });
6769
}

0 commit comments

Comments
 (0)