You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -176,6 +179,12 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
176
179
);
177
180
for(constworkspaceofworkspaces){
178
181
if(awaitthis.isValidSketchPath(workspace.file)){
182
+
if(this.isTempSketch.is(workspace.file)){
183
+
console.info(
184
+
`Skipped opening sketch. The sketch was detected as temporary. Workspace path: ${workspace.file}.`
185
+
);
186
+
continue;
187
+
}
179
188
useDefault=false;
180
189
awaitthis.openSketch(workspace);
181
190
}
@@ -405,6 +414,15 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
405
414
constworkspaceUri=URI.file(workspace);
406
415
constbounds=window.getNormalBounds();
407
416
constnow=Date.now();
417
+
// Do not try to reopen the sketch if it was temp.
418
+
// Unfortunately, IDE2 has two different logic of restoring recent sketches: the Theia default `recentworkspace.json` and there is the `recent-sketches.json`.
419
+
constfile=workspaceUri.fsPath;
420
+
if(this.isTempSketch.is(file)){
421
+
console.info(
422
+
`Ignored marking workspace as a closed sketch. The sketch was detected as temporary. Workspace URI: ${workspaceUri.toString()}.`
423
+
);
424
+
return;
425
+
}
408
426
console.log(
409
427
`Marking workspace as a closed sketch. Workspace URI: ${workspaceUri.toString()}. Date: ${now}.`
0 commit comments