diff options
-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]; |