mirror of
https://github.com/Microsoft/vscode
synced 2024-11-05 18:29:38 +00:00
Ensure that when there is a Windows drive letter as the whole path the simple file picker keeps the slash
Part of https://github.com/microsoft/vscode-remote-release/issues/1596
This commit is contained in:
parent
5d0bd4987c
commit
4ba2070818
1 changed files with 6 additions and 1 deletions
|
@ -290,7 +290,12 @@ export class SimpleFileDialog {
|
|||
|
||||
function doResolve(dialog: SimpleFileDialog, uri: URI | undefined) {
|
||||
if (uri) {
|
||||
uri = resources.removeTrailingPathSeparator(uri);
|
||||
// If the uri is only the drive letter, make sure it has the trailing path separator
|
||||
if (/^[a-zA-Z]:(\/$|\\$|$)/.test(uri.fsPath)) {
|
||||
uri = resources.addTrailingPathSeparator(uri);
|
||||
} else {
|
||||
uri = resources.removeTrailingPathSeparator(uri);
|
||||
}
|
||||
}
|
||||
resolve(uri);
|
||||
dialog.contextKey.set(false);
|
||||
|
|
Loading…
Reference in a new issue