Fix file dialog case for waving without extension

Fixes #72850
This commit is contained in:
Alex Ross 2019-04-25 11:55:51 +02:00
parent 3d4048695f
commit 1b1a4cc241

View file

@ -501,7 +501,6 @@ export class RemoteFileDialog {
// Make sure that the suffix is added. If the user deleted it, we automatically add it here
let hasExt: boolean = false;
const currentExt = resources.extname(uri).substr(1);
if (currentExt !== '') {
for (let i = 0; i < this.options.filters.length; i++) {
for (let j = 0; j < this.options.filters[i].extensions.length; j++) {
if ((this.options.filters[i].extensions[j] === '*') || (this.options.filters[i].extensions[j] === currentExt)) {
@ -513,7 +512,6 @@ export class RemoteFileDialog {
break;
}
}
}
if (!hasExt) {
result = resources.joinPath(resources.dirname(uri), resources.basename(uri) + '.' + this.options.filters[0].extensions[0]);
}