diff options
author | Daniel Kříž <Daniel.kriz@protonmail.com> | 2022-04-06 22:38:16 +0200 |
---|---|---|
committer | Daniel Kříž <Daniel.kriz@protonmail.com> | 2022-04-06 22:49:50 +0200 |
commit | cbe363d7161d765577e9babf22a2d6f158b6259a (patch) | |
tree | 53296e7871d054a17cab9257a2033dfe334fb95c /editor/filesystem_dock.cpp | |
parent | 9d3c8f04d4927bc464197a50fab3aca5a8355d98 (diff) |
Fix missing favorite files in filesystem dock
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r-- | editor/filesystem_dock.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index bca78d18e4..bbbdd85a5a 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -228,10 +228,11 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES); bool fav_changed = false; for (int i = favorite_paths.size() - 1; i >= 0; i--) { - if (!da->dir_exists(favorite_paths[i])) { - favorite_paths.remove_at(i); - fav_changed = true; + if (da->dir_exists(favorite_paths[i]) || da->file_exists(favorite_paths[i])) { + continue; } + favorite_paths.remove_at(i); + fav_changed = true; } if (fav_changed) { EditorSettings::get_singleton()->set_favorites(favorite_paths); |