@@ -2676,7 +2676,7 @@ index a1c3e50ffd..910627aaf9 100644
2676
2676
throw new Error(`Cannot load URI: '${module}', must be of file-scheme`);
2677
2677
}
2678
2678
diff --git a/src/vs/workbench/api/node/extHostStoragePaths.ts b/src/vs/workbench/api/node/extHostStoragePaths.ts
2679
- index afdd6bf398..604fdd255c 100644
2679
+ index afdd6bf398..1633daf93d 100644
2680
2680
--- a/src/vs/workbench/api/node/extHostStoragePaths.ts
2681
2681
+++ b/src/vs/workbench/api/node/extHostStoragePaths.ts
2682
2682
@@ -5,13 +5,14 @@
@@ -2704,18 +2704,20 @@ index afdd6bf398..604fdd255c 100644
2704
2704
) {
2705
2705
this._workspace = withNullAsUndefined(initData.workspace);
2706
2706
this._environment = initData.environment;
2707
- @@ -54,21 +56,25 @@ export class ExtensionStoragePaths implements IExtensionStoragePaths {
2707
+ @@ -54,21 +56,26 @@ export class ExtensionStoragePaths implements IExtensionStoragePaths {
2708
2708
const storageName = this._workspace.id;
2709
2709
const storagePath = path.join(this._environment.appSettingsHome.fsPath, 'workspaceStorage', storageName);
2710
2710
2711
2711
- const exists = await pfs.dirExists(storagePath);
2712
+ -
2713
+ - if (exists) {
2712
2714
+ // NOTE@coder: Use the file system proxy so this will work in the browser.
2713
- + // writeFile performs a mkdirp so we don't need to bother ourselves.
2714
2715
+ const fileSystem = this._extHostRpc.getProxy(MainContext.MainThreadFileSystem);
2715
- + const exists = fileSystem.$stat(URI.file(storagePath));
2716
-
2717
- if (exists) {
2716
+ + try {
2717
+ + await fileSystem.$stat(URI.file(storagePath));
2718
2718
return storagePath;
2719
+ + } catch (error) {
2720
+ + // Doesn't exist.
2719
2721
}
2720
2722
2721
2723
try {
@@ -2727,6 +2729,7 @@ index afdd6bf398..604fdd255c 100644
2727
2729
- configuration: this._workspace.configuration && URI.revive(this._workspace.configuration).toString(),
2728
2730
- name: this._workspace.name
2729
2731
- }, undefined, 2)
2732
+ + // NOTE@coder: $writeFile performs a mkdirp.
2730
2733
+ await fileSystem.$writeFile(
2731
2734
+ URI.file(path.join(storagePath, 'meta.json')),
2732
2735
+ VSBuffer.fromString(
0 commit comments