diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-26 15:54:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-26 15:54:51 +0100 |
commit | 188ca5470b11222f3caf27082cfadce861dbaa60 (patch) | |
tree | 73c00f353664c6eff323785953a3a7e3ff305f9c | |
parent | cd43ab38d718fb4bb227c09525f04cf7189f7182 (diff) | |
parent | 057a0e00ebb3a7cbfd5692363c9d219156f0373c (diff) |
Merge pull request #46638 from Ev1lbl0w/feature-hide_gdignored_dirs
-rw-r--r-- | editor/editor_file_dialog.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 0c2faacf02..fe19e73db9 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -781,12 +781,19 @@ void EditorFileDialog::update_file_list() { continue; } - if (show_hidden_files || !dir_access->current_is_hidden()) { + if (show_hidden_files) { if (!dir_access->current_is_dir()) { files.push_back(item); } else { dirs.push_back(item); } + } else if (!dir_access->current_is_hidden()) { + String full_path = cdir == "res://" ? item : dir_access->get_current_dir() + "/" + item; + if (dir_access->current_is_dir() && !EditorFileSystem::_should_skip_directory(full_path)) { + dirs.push_back(item); + } else { + files.push_back(item); + } } item = dir_access->get_next(); } |