From 4b0d65970d223575d45b1a3d8bbc04decbd50589 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 10 May 2023 12:35:32 +0200 Subject: [PATCH] Revert "Use tmp dir for extension extract location (#181893)" This reverts commit c1eab19b67b15869019bd3255d90e1c125d79525. --- .../extensionManagement/node/extensionManagementService.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index c81edddef45..791dfbb78dd 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -10,7 +10,6 @@ import { IStringDictionary } from 'vs/base/common/collections'; import { toErrorMessage } from 'vs/base/common/errorMessage'; import { getErrorMessage } from 'vs/base/common/errors'; import { Emitter } from 'vs/base/common/event'; -import { randomPath } from 'vs/base/common/extpath'; import { Disposable } from 'vs/base/common/lifecycle'; import { ResourceSet } from 'vs/base/common/map'; import { Schemas } from 'vs/base/common/network'; @@ -415,7 +414,6 @@ export class ExtensionsScanner extends Disposable { @IFileService private readonly fileService: IFileService, @IExtensionsScannerService private readonly extensionsScannerService: IExtensionsScannerService, @IExtensionsProfileScannerService private readonly extensionsProfileScannerService: IExtensionsProfileScannerService, - @INativeEnvironmentService private readonly environmentService: INativeEnvironmentService, @ILogService private readonly logService: ILogService, ) { super(); @@ -458,7 +456,7 @@ export class ExtensionsScanner extends Disposable { async extractUserExtension(extensionKey: ExtensionKey, zipPath: string, metadata: Metadata, token: CancellationToken): Promise { const folderName = extensionKey.toString(); - const tempPath = randomPath(this.environmentService.tmpDir.fsPath); + const tempPath = path.join(this.extensionsScannerService.userExtensionsLocation.fsPath, `.${generateUuid()}`); const extensionPath = path.join(this.extensionsScannerService.userExtensionsLocation.fsPath, folderName); try {