Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix import dock not ignoring directories with a gdignore

mattigu7787ef786e19
diff --git a/editor/docks/filesystem_dock.cpp b/editor/docks/filesystem_dock.cpp
index e7ebadaacb3..f53c164e378 100644
--- a/editor/docks/filesystem_dock.cpp
+++ b/editor/docks/filesystem_dock.cpp
@@ -4042,6 +4042,10 @@ bool FileSystemDock::_get_imported_files(const String &p_path, String &r_extensi
Ref<DirAccess> da = DirAccess::open(p_path);
ERR_FAIL_COND_V(da.is_null(), false);
+ if (da->file_exists(".gdignore")) {
+ return true;
+ }
+
da->list_dir_begin();
String n = da->get_next();
while (!n.is_empty()) {