We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0c495a commit 58da93dCopy full SHA for 58da93d
src/system/path.ts
@@ -177,7 +177,10 @@ export function normalizePath(path: string): string {
177
178
path = path.replace(pathNormalizeRegex, '/');
179
if (path.charCodeAt(path.length - 1) === slash) {
180
- path = path.slice(0, -1);
+ // Don't remove the trailing slash on Windows root folders, such as z:\
181
+ if (path.length != 3 || (path.length == 3 && path.charCodeAt(1) != ':')) {
182
+ path = path.slice(0, -1);
183
+ }
184
}
185
186
if (isWindows) {
0 commit comments