未验证 提交 2f81ec4e 编写于 作者: S SteVen Batten 提交者: GitHub

remove unnecessary filter conversion (#62505)

上级 ed84ffaf
......@@ -272,17 +272,12 @@ export class FileDialogService implements IFileDialogService {
if (defaultUri && defaultUri.scheme !== Schemas.file) {
return Promise.reject(new Error('Not supported - Open-dialogs can only be opened on `file`-uris.'));
}
const filters = [];
if (options.filters) {
for (let name in options.filters) {
filters.push({ name, extensions: options.filters[name] });
}
}
const newOptions: OpenDialogOptions = {
title: options.title,
defaultPath: defaultUri && defaultUri.fsPath,
buttonLabel: options.openLabel,
filters,
filters: options.filters,
properties: []
};
newOptions.properties.push('createDirectory');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册