浏览代码

Ignore hidden files and directories in find in files

Pedro J. Estébanez 5 年之前
父节点
当前提交
aeff876868
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      editor/find_in_files.cpp

+ 3 - 1
editor/find_in_files.cpp

@@ -235,9 +235,11 @@ void FindInFiles::_scan_dir(String path, PoolStringArray &out_folders) {
 		if (file == "")
 		if (file == "")
 			break;
 			break;
 
 
-		// Ignore special dirs and hidden dirs (such as .git and .import)
+		// Ignore special dirs (such as .git and .import)
 		if (file == "." || file == ".." || file.begins_with("."))
 		if (file == "." || file == ".." || file.begins_with("."))
 			continue;
 			continue;
+		if (dir->current_is_hidden())
+			continue;
 
 
 		if (dir->current_is_dir())
 		if (dir->current_is_dir())
 			out_folders.append(file);
 			out_folders.append(file);