mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-14 06:46:36 +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 });
|
const workspaceUri = await this.sketchService.copy(sketch, { destinationUri });
|
||||||
if (workspaceUri && openAfterMove) {
|
if (workspaceUri && openAfterMove) {
|
||||||
if (wipeOriginal || (openAfterMove && execOnlyIfTemp)) {
|
if (wipeOriginal || (openAfterMove && execOnlyIfTemp)) {
|
||||||
|
try {
|
||||||
await this.fileService.delete(new URI(sketch.uri), { recursive: true });
|
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 });
|
this.workspaceService.open(new URI(workspaceUri), { preserveWindow: true });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user