Skip to content

Commit

Permalink
Disable the option to show system files on windows by default
Browse files Browse the repository at this point in the history
  • Loading branch information
crumblingstatue committed Oct 25, 2024
1 parent e16194e commit e5d028c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ impl Default for FileDialogConfig {
show_menu_button: true,
show_reload_button: true,
show_hidden_option: true,
show_system_files_option: true,
show_system_files_option: SHOW_SYSTEM_FILES_OPTION_DEFAULT,
show_search: true,

show_left_panel: true,
Expand All @@ -262,6 +262,13 @@ impl Default for FileDialogConfig {
}
}

/// On Windows, displaying system files is troublesome, the option should only
/// be enabled on explicit request.
#[cfg(windows)]
const SHOW_SYSTEM_FILES_OPTION_DEFAULT: bool = false;
#[cfg(not(windows))]
const SHOW_SYSTEM_FILES_OPTION_DEFAULT: bool = true;

impl FileDialogConfig {
/// Sets the storage used by the file dialog.
/// Storage includes all data that is persistently stored between multiple
Expand Down

0 comments on commit e5d028c

Please sign in to comment.