瀏覽代碼

Fixes #1932 invalid comparison & only on windows

main
Eric Amodio 2 年之前
父節點
當前提交
b0c39edbd4
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/system/path.ts

+ 1
- 1
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);
}
}

Loading…
取消
儲存