In Windows, if I edit the file ex.txt in the root of a mapped network drive, say Z:\, I get this error:
Unable to get absolute uri between ex.txt and z:; Base path 'z:' must be an absolute path
This is because this code:
|
if (path.charCodeAt(path.length - 1) === slash) { |
|
path = path.slice(0, -1); |
|
} |
is removing the trashing slash. This works for all paths except for paths in the root folder, where the trailing slash should remain. This could be fixed via:
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) != ':')) {
path = path.slice(0, -1);
}
}
In Windows, if I edit the file ex.txt in the root of a mapped network drive, say
Z:\, I get this error:This is because this code:
vscode-gitlens/src/system/path.ts
Lines 169 to 171 in 8d8ba96
is removing the trashing slash. This works for all paths except for paths in the root folder, where the trailing slash should remain. This could be fixed via: