mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-27 02:27:53 +01:00
Use posix.join
This commit is contained in:
@@ -10,7 +10,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { fork, ChildProcess } from 'child_process';
|
||||
import { toErrorMessage } from 'vs/base/common/errorMessage';
|
||||
import { join } from 'vs/base/common/paths';
|
||||
import { posix } from 'path';
|
||||
import { Limiter } from 'vs/base/common/async';
|
||||
import { fromNodeEventEmitter, anyEvent, mapEvent, debounceEvent } from 'vs/base/common/event';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
@@ -43,7 +43,7 @@ export class ExtensionsLifecycle extends Disposable {
|
||||
this.logService.warn(extension.identifier.id, 'Uninstall script should be a node script');
|
||||
return null;
|
||||
}
|
||||
return { uninstallHook: join(extension.location.fsPath, uninstallScript[1]), args: uninstallScript.slice(2) || [] };
|
||||
return { uninstallHook: posix.join(extension.location.fsPath, uninstallScript[1]), args: uninstallScript.slice(2) || [] };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import { createHash } from 'crypto';
|
||||
import { IExtensionManagementService, ILocalExtension, IExtensionIdentifier } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { join } from 'vs/base/common/paths';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Limiter } from 'vs/base/common/async';
|
||||
import { areSameExtensions, getGalleryExtensionIdFromLocal, getIdFromLocalExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
@@ -18,6 +17,7 @@ import product from 'vs/platform/node/product';
|
||||
import { distinct, equals } from 'vs/base/common/arrays';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { posix } from 'path';
|
||||
|
||||
interface ILanguagePack {
|
||||
hash: string;
|
||||
@@ -107,7 +107,7 @@ class LanguagePacksCache extends Disposable {
|
||||
@ILogService private logService: ILogService
|
||||
) {
|
||||
super();
|
||||
this.languagePacksFilePath = join(environmentService.userDataPath, 'languagepacks.json');
|
||||
this.languagePacksFilePath = posix.join(environmentService.userDataPath, 'languagepacks.json');
|
||||
this.languagePacksFileLimiter = new Limiter(1);
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ class LanguagePacksCache extends Disposable {
|
||||
languagePack.extensions.push({ extensionIdentifier, version: extension.manifest.version });
|
||||
}
|
||||
for (const translation of localizationContribution.translations) {
|
||||
languagePack.translations[translation.id] = join(extension.location.path, translation.path);
|
||||
languagePack.translations[translation.id] = posix.join(extension.location.fsPath, translation.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { groupBy } from 'vs/base/common/collections';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { join } from 'vs/base/common/paths';
|
||||
import { posix } from 'path';
|
||||
|
||||
interface IExtensionStateProvider<T> {
|
||||
(extension: Extension): T;
|
||||
@@ -138,7 +138,7 @@ class Extension implements IExtension {
|
||||
|
||||
private get localIconUrl(): string {
|
||||
if (this.local && this.local.manifest.icon) {
|
||||
return this.local.location.with({ path: join(this.local.location.path, this.local.manifest.icon) }).toString();
|
||||
return this.local.location.with({ path: posix.join(this.local.location.path, this.local.manifest.icon) }).toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user