From b0c39edbd45e17294707788baf7e2658cca1a14f Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 31 Mar 2022 02:11:49 -0400 Subject: [PATCH] Fixes #1932 invalid comparison & only on windows --- src/system/path.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/path.ts b/src/system/path.ts index e25475d..c536909 100644 --- a/src/system/path.ts +++ b/src/system/path.ts @@ -178,7 +178,7 @@ export function normalizePath(path: string): string { path = path.replace(pathNormalizeRegex, '/'); if (path.charCodeAt(path.length - 1) === slash) { // Don't remove the trailing slash on Windows root folders, such as z:\ - if (path.length != 3 || (path.length == 3 && path.charCodeAt(1) != ':')) { + if (!isWindows || path.length !== 3 || path[1] !== ':') { path = path.slice(0, -1); } }