Reduce usages of extpath.normalizeWithSlashes() (#68928)

* adopt in tests

* adopt more join() that are straight forward

* more safe usages

* more adoption
This commit is contained in:
Benjamin Pasero
2019-02-18 16:31:02 +01:00
committed by GitHub
parent 95719e9158
commit 39566fa5e3
32 changed files with 111 additions and 116 deletions

View File

@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { joinWithSlashes } from 'vs/base/common/extpath';
import { join } from 'vs/base/common/path';
import { ILogService, DelegatedLogService, LogLevel } from 'vs/platform/log/common/log';
import { createSpdLogService } from 'vs/platform/log/node/spdlogService';
import { ExtHostLogServiceShape } from 'vs/workbench/api/node/extHost.protocol';
@@ -11,7 +12,6 @@ import { ExtensionHostLogFileName } from 'vs/workbench/services/extensions/commo
import { URI } from 'vs/base/common/uri';
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
export class ExtHostLogService extends DelegatedLogService implements ILogService, ExtHostLogServiceShape {
private _logsPath: string;
@@ -23,7 +23,7 @@ export class ExtHostLogService extends DelegatedLogService implements ILogServic
) {
super(createSpdLogService(ExtensionHostLogFileName, logLevel, logsPath));
this._logsPath = logsPath;
this.logFile = URI.file(joinWithSlashes(logsPath, `${ExtensionHostLogFileName}.log`));
this.logFile = URI.file(join(logsPath, `${ExtensionHostLogFileName}.log`));
}
$setLevel(level: LogLevel): void {