Fix bad tilda handling in simple file picker

Part of #121280
This commit is contained in:
Alex Ross 2021-04-26 15:31:45 +02:00
parent 289d46f960
commit 25b4a53f67
No known key found for this signature in database
GPG key ID: 89DDDBA66CBA7840

View file

@ -540,9 +540,11 @@ export class SimpleFileDialog {
}
private tildaReplace(value: string): URI {
const home = this.userHome;
if ((value[0] === '~') && (value.length > 1)) {
let home = this.userHome;
return resources.joinPath(home, value.substring(1));
} else if (value[value.length - 1] === '~') {
return home;
}
return this.remoteUriFrom(value);
}