diff options
author | Ev1lbl0w <ricasubtil@gmail.com> | 2021-03-03 14:33:34 +0000 |
---|---|---|
committer | Ev1lbl0w <ricasubtil@gmail.com> | 2021-03-03 22:25:13 +0000 |
commit | 057a0e00ebb3a7cbfd5692363c9d219156f0373c (patch) | |
tree | a3b4a36882f100fc001515c7445c454267f833e8 /editor/editor_file_dialog.cpp | |
parent | 44e73473c6af24bc83ed2ec40a1c0162624dd8fc (diff) |
Hide .gdignore'd folders
Diffstat (limited to 'editor/editor_file_dialog.cpp')
-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 6d694358bf..76659507dd 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -762,12 +762,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); + } } } |