Skip to content

Commit b0c39ed

Browse files
committed
Fixes #1932 invalid comparison & only on windows
1 parent 4f80b66 commit b0c39ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/system/path.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export function normalizePath(path: string): string {
178178
path = path.replace(pathNormalizeRegex, '/');
179179
if (path.charCodeAt(path.length - 1) === slash) {
180180
// Don't remove the trailing slash on Windows root folders, such as z:\
181-
if (path.length != 3 || (path.length == 3 && path.charCodeAt(1) != ':')) {
181+
if (!isWindows || path.length !== 3 || path[1] !== ':') {
182182
path = path.slice(0, -1);
183183
}
184184
}

0 commit comments

Comments
 (0)