From 0ab3c1fe9652ab0e3537adcd0b45e246f0262a12 Mon Sep 17 00:00:00 2001 From: Mine Starks Date: Tue, 15 May 2018 13:35:24 -0700 Subject: [PATCH 1/2] Normalize this.currentDirectory --- src/server/editorServices.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 459b4b12d8314..dd27130ea72fe 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -403,7 +403,7 @@ namespace ts.server { /* @internal */ pendingEnsureProjectForOpenFiles: boolean; - readonly currentDirectory: string; + readonly currentDirectory: NormalizedPath; readonly toCanonicalFileName: (f: string) => string; public readonly host: ServerHost; @@ -450,7 +450,7 @@ namespace ts.server { if (this.host.realpath) { this.realpathToScriptInfos = createMultiMap(); } - this.currentDirectory = this.host.getCurrentDirectory(); + this.currentDirectory = toNormalizedPath(this.host.getCurrentDirectory()); this.toCanonicalFileName = createGetCanonicalFileName(this.host.useCaseSensitiveFileNames); this.globalCacheLocationDirectoryPath = this.typingsInstaller.globalTypingsCacheLocation && ensureTrailingDirectorySeparator(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)); From dff5809c68564891d39f44be1342b782eece3e11 Mon Sep 17 00:00:00 2001 From: Mine Starks Date: Wed, 16 May 2018 09:27:14 -0700 Subject: [PATCH 2/2] Accept new baseline --- tests/baselines/reference/api/tsserverlibrary.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 6c3e0c9b7a193..5ea9484aaf859 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -8154,7 +8154,7 @@ declare namespace ts.server { private safelist; private legacySafelist; private pendingProjectUpdates; - readonly currentDirectory: string; + readonly currentDirectory: NormalizedPath; readonly toCanonicalFileName: (f: string) => string; readonly host: ServerHost; readonly logger: Logger;