Skip to content

Commit a2ad3d4

Browse files
committed
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.
1 parent 4a29cd1 commit a2ad3d4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/vscode/src/dialog.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@ export type DialogOptions = OpenDialogOptions | SaveDialogOptions;
5252

5353
export const showOpenDialog = (options: OpenDialogOptions): Promise<string> => {
5454
return new Promise<string>((resolve, reject): void => {
55-
const dialog = new Dialog(DialogType.Open, options);
55+
// Make the default to show hidden files and directories since there is no
56+
// other way to make them visible in the dialogs currently.
57+
const dialog = new Dialog(DialogType.Open, typeof options.properties.showHiddenFiles === "undefined" ? {
58+
...options,
59+
properties: {
60+
...options.properties,
61+
showHiddenFiles: true,
62+
},
63+
} : options);
5664
dialog.onSelect((e) => {
5765
dialog.dispose();
5866
resolve(e);

0 commit comments

Comments
 (0)