diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 4664defa59e1..ad42fba1c894 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];