aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/main.ts')
-rw-r--r--editors/code/src/main.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index 74ee28d24..fb9d38a14 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -160,7 +160,7 @@ export async function deactivate() {
160} 160}
161 161
162async function bootstrap(config: Config, state: PersistentState): Promise<string> { 162async function bootstrap(config: Config, state: PersistentState): Promise<string> {
163 await fs.mkdir(config.globalStoragePath, { recursive: true }); 163 await vscode.workspace.fs.createDirectory(config.globalStorageUri);
164 164
165 if (!config.currentExtensionIsNightly) { 165 if (!config.currentExtensionIsNightly) {
166 await state.updateNightlyReleaseId(undefined); 166 await state.updateNightlyReleaseId(undefined);
@@ -222,7 +222,7 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi
222 const artifact = latestNightlyRelease.assets.find(artifact => artifact.name === "rust-analyzer.vsix"); 222 const artifact = latestNightlyRelease.assets.find(artifact => artifact.name === "rust-analyzer.vsix");
223 assert(!!artifact, `Bad release: ${JSON.stringify(latestNightlyRelease)}`); 223 assert(!!artifact, `Bad release: ${JSON.stringify(latestNightlyRelease)}`);
224 224
225 const dest = path.join(config.globalStoragePath, "rust-analyzer.vsix"); 225 const dest = path.join(config.globalStorageUri.path, "rust-analyzer.vsix");
226 226
227 await downloadWithRetryDialog(state, async () => { 227 await downloadWithRetryDialog(state, async () => {
228 await download({ 228 await download({
@@ -334,7 +334,7 @@ async function getServer(config: Config, state: PersistentState): Promise<string
334 platform = "x86_64-unknown-linux-musl"; 334 platform = "x86_64-unknown-linux-musl";
335 } 335 }
336 const ext = platform.indexOf("-windows-") !== -1 ? ".exe" : ""; 336 const ext = platform.indexOf("-windows-") !== -1 ? ".exe" : "";
337 const dest = path.join(config.globalStoragePath, `rust-analyzer-${platform}${ext}`); 337 const dest = path.join(config.globalStorageUri.path, `rust-analyzer-${platform}${ext}`);
338 const exists = await fs.stat(dest).then(() => true, () => false); 338 const exists = await fs.stat(dest).then(() => true, () => false);
339 if (!exists) { 339 if (!exists) {
340 await state.updateServerVersion(undefined); 340 await state.updateServerVersion(undefined);