Fix removing a folder that contains a file is not removed from the FileSystem Dock

This commit is contained in:
Hilderin 2024-07-16 08:40:55 -04:00
parent 97b8ad1af0
commit a1ef54fd3b
1 changed files with 4 additions and 1 deletions

View File

@ -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];