summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_file_dialog.cpp9
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();
}