Skip to content

Commit 6124b10

Browse files
committed
web - drop retoring previous folder
1 parent 97c1e76 commit 6124b10

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/vs/code/browser/workbench/workbench.ts

-22
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,6 @@ class LocalStorageURLCallbackProvider extends Disposable implements IURLCallback
282282

283283
class WorkspaceProvider implements IWorkspaceProvider {
284284

285-
private static readonly LAST_WORKSPACE_STORAGE_KEY = 'workspaces.lastOpened';
286-
287285
private static QUERY_PARAM_EMPTY_WINDOW = 'ew';
288286
private static QUERY_PARAM_FOLDER = 'folder';
289287
private static QUERY_PARAM_WORKSPACE = 'workspace';
@@ -350,29 +348,9 @@ class WorkspaceProvider implements IWorkspaceProvider {
350348
workspace = { folderUri: URI.revive(config.folderUri) };
351349
} else if (config.workspaceUri) {
352350
workspace = { workspaceUri: URI.revive(config.workspaceUri) };
353-
} else {
354-
workspace = (() => {
355-
const lastWorkspaceRaw = window.localStorage.getItem(WorkspaceProvider.LAST_WORKSPACE_STORAGE_KEY);
356-
if (lastWorkspaceRaw) {
357-
try {
358-
return parse(lastWorkspaceRaw); // use marshalling#parse() to revive potential URIs
359-
} catch (error) {
360-
// Ignore
361-
}
362-
}
363-
364-
return undefined;
365-
})();
366351
}
367352
}
368353

369-
// Keep this as last opened workspace in storage
370-
if (workspace) {
371-
window.localStorage.setItem(WorkspaceProvider.LAST_WORKSPACE_STORAGE_KEY, JSON.stringify(workspace));
372-
} else {
373-
window.localStorage.removeItem(WorkspaceProvider.LAST_WORKSPACE_STORAGE_KEY);
374-
}
375-
376354
return new WorkspaceProvider(workspace, payload, config);
377355
}
378356

0 commit comments

Comments
 (0)