From 3ca7f61a8d736d8e56f0d413b109e6e6562c0a30 Mon Sep 17 00:00:00 2001 From: wxb1ank Date: Sun, 23 May 2021 16:33:32 -0400 Subject: internal: use vscode.FileSystem API in main.ts --- editors/code/src/main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'editors/code/src/main.ts') diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 74ee28d2457..fb9d38a14dd 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -160,7 +160,7 @@ export async function deactivate() { } async function bootstrap(config: Config, state: PersistentState): Promise { - await fs.mkdir(config.globalStoragePath, { recursive: true }); + await vscode.workspace.fs.createDirectory(config.globalStorageUri); if (!config.currentExtensionIsNightly) { await state.updateNightlyReleaseId(undefined); @@ -222,7 +222,7 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi const artifact = latestNightlyRelease.assets.find(artifact => artifact.name === "rust-analyzer.vsix"); assert(!!artifact, `Bad release: ${JSON.stringify(latestNightlyRelease)}`); - const dest = path.join(config.globalStoragePath, "rust-analyzer.vsix"); + const dest = path.join(config.globalStorageUri.path, "rust-analyzer.vsix"); await downloadWithRetryDialog(state, async () => { await download({ @@ -334,7 +334,7 @@ async function getServer(config: Config, state: PersistentState): Promise true, () => false); if (!exists) { await state.updateServerVersion(undefined); -- cgit 1.4.1-3-g733a5