未验证 提交 a2ad3d4f 编写于 作者: A Asher

Show hidden files by default

Since there is no other way to enable hidden files, it seems better to
enable it by default otherwise there are some folders/files you simply
can never open from the dialog.
上级 4a29cd16
......@@ -52,7 +52,15 @@ export type DialogOptions = OpenDialogOptions | SaveDialogOptions;
export const showOpenDialog = (options: OpenDialogOptions): Promise<string> => {
return new Promise<string>((resolve, reject): void => {
const dialog = new Dialog(DialogType.Open, options);
// Make the default to show hidden files and directories since there is no
// other way to make them visible in the dialogs currently.
const dialog = new Dialog(DialogType.Open, typeof options.properties.showHiddenFiles === "undefined" ? {
...options,
properties: {
...options.properties,
showHiddenFiles: true,
},
} : options);
dialog.onSelect((e) => {
dialog.dispose();
resolve(e);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册