diff options
author | Hilderin <81109165+Hilderin@users.noreply.github.com> | 2024-07-16 08:40:55 -0400 |
---|---|---|
committer | Hilderin <81109165+Hilderin@users.noreply.github.com> | 2024-07-16 08:52:39 -0400 |
commit | a1ef54fd3bf8c68ca1086253296eec8024c7497a (patch) | |
tree | c905dc031acb474c630f710d37fe5689591f706f /editor/editor_file_system.cpp | |
parent | 97b8ad1af0f2b4a216f6f1263bef4fbc69e56c7b (diff) | |
download | redot-engine-a1ef54fd3bf8c68ca1086253296eec8024c7497a.tar.gz |
Fix removing a folder that contains a file is not removed from the FileSystem Dock
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r-- | editor/editor_file_system.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 4664defa59..ad42fba1c8 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1594,7 +1594,10 @@ bool EditorFileSystem::_find_file(const String &p_file, EditorFileSystemDirector } if (idx == -1) { - //does not exist, create i guess? + // Only create a missing directory in memory when it exists on disk. + if (!dir->dir_exists(fs->get_path().path_join(path[i]))) { + return false; + } EditorFileSystemDirectory *efsd = memnew(EditorFileSystemDirectory); efsd->name = path[i]; |