mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-13 14:26:37 +00:00
Do not bail when wiping the temp sketch has failed
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
parent
113fe38850
commit
911875665d
@ -61,7 +61,9 @@ export class SaveAsSketch extends SketchContribution {
|
||||
const workspaceUri = await this.sketchService.copy(sketch, { destinationUri });
|
||||
if (workspaceUri && openAfterMove) {
|
||||
if (wipeOriginal || (openAfterMove && execOnlyIfTemp)) {
|
||||
await this.fileService.delete(new URI(sketch.uri), { recursive: true });
|
||||
try {
|
||||
await this.fileService.delete(new URI(sketch.uri), { recursive: true });
|
||||
} catch { /* NOOP: from time to time, it's not possible to wipe the old resource from the temp dir on Windows */ }
|
||||
}
|
||||
this.workspaceService.open(new URI(workspaceUri), { preserveWindow: true });
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user