Ignore hidden files and directories in find in files

(cherry picked from commit aeff876868)
This commit is contained in:
Pedro J. Estébanez 2020-02-10 09:19:02 +01:00 committed by Rémi Verschelde
parent 59b8f9b2da
commit a8ae52e998
1 changed files with 3 additions and 1 deletions

View File

@ -235,9 +235,11 @@ void FindInFiles::_scan_dir(String path, PoolStringArray &out_folders) {
if (file == "")
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("."))
continue;
if (dir->current_is_hidden())
continue;
if (dir->current_is_dir())
out_folders.append(file);