mirror of
https://github.com/Microsoft/vscode
synced 2024-11-05 18:29:38 +00:00
Use tmp dir for extension extract location (#181893)
#181671 use tmp path for extracted extensions
This commit is contained in:
parent
618dc85f33
commit
c1eab19b67
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@ 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';
|
||||
|
@ -414,6 +415,7 @@ 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();
|
||||
|
@ -456,7 +458,7 @@ export class ExtensionsScanner extends Disposable {
|
|||
|
||||
async extractUserExtension(extensionKey: ExtensionKey, zipPath: string, metadata: Metadata, token: CancellationToken): Promise<ILocalExtension> {
|
||||
const folderName = extensionKey.toString();
|
||||
const tempPath = path.join(this.extensionsScannerService.userExtensionsLocation.fsPath, `.${generateUuid()}`);
|
||||
const tempPath = randomPath(this.environmentService.tmpDir.fsPath);
|
||||
const extensionPath = path.join(this.extensionsScannerService.userExtensionsLocation.fsPath, folderName);
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue