Skip to content

Commit

Permalink
Merge pull request #94435 from Hilderin/fix-removing-folder-with-files
Browse files Browse the repository at this point in the history
Fix removing a folder that contains a file is not removed from the FileSystem Dock
  • Loading branch information
akien-mga committed Jul 17, 2024
2 parents 6827779 + a1ef54f commit ee9f20b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion editor/editor_file_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit ee9f20b

Please sign in to comment.