Fix jumping path separator for drive letter in file picker

Part of #microsoft/vscode-remote-release#5001
This commit is contained in:
Alex Ross 2021-06-08 16:08:52 +02:00
parent 88875325a7
commit 1153615700
No known key found for this signature in database
GPG key ID: 89DDDBA66CBA7840

View file

@ -450,8 +450,12 @@ export class SimpleFileDialog {
private constructFullUserPath(): string {
const currentFolderPath = this.pathFromUri(this.currentFolder);
if (equalsIgnoreCase(this.filePickBox.value.substr(0, this.userEnteredPathSegment.length), this.userEnteredPathSegment) && equalsIgnoreCase(this.filePickBox.value.substr(0, currentFolderPath.length), currentFolderPath)) {
return currentFolderPath;
if (equalsIgnoreCase(this.filePickBox.value.substr(0, this.userEnteredPathSegment.length), this.userEnteredPathSegment)) {
if (equalsIgnoreCase(this.filePickBox.value.substr(0, currentFolderPath.length), currentFolderPath)) {
return currentFolderPath;
} else {
return this.userEnteredPathSegment;
}
} else {
return this.pathAppend(this.currentFolder, this.userEnteredPathSegment);
}