Skip to content

Commit

Permalink
Duplicated file extension in save dialog. Fixes #106858
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Sep 16, 2020
1 parent 21d010d commit 02cf31c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { IFileService } from 'vs/platform/files/common/files';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { IHostService } from 'vs/workbench/services/host/browser/host';
import Severity from 'vs/base/common/severity';
import { coalesce } from 'vs/base/common/arrays';
import { coalesce, distinct } from 'vs/base/common/arrays';
import { trim } from 'vs/base/common/strings';
import { IModeService } from 'vs/editor/common/services/modeService';
import { ILabelService } from 'vs/platform/label/common/label';
Expand Down Expand Up @@ -264,7 +264,7 @@ export abstract class AbstractFileDialogService implements IFileDialogService {
return null;
}

const filter: IFilter = { name: languageName, extensions: extensions.slice(0, 10).map(e => trim(e, '.')) };
const filter: IFilter = { name: languageName, extensions: distinct(extensions).slice(0, 10).map(e => trim(e, '.')) };

if (ext && extensions.indexOf(ext) >= 0) {
matchingFilter = filter;
Expand Down

0 comments on commit 02cf31c

Please sign in to comment.