Folder search now reads all relevant exclude patterns

Previously it wouldn’t read kSettingsExcludeDirectoriesKey and kSettingsExcludeFilesKey.
This commit is contained in:
Allan Odgaard
2013-01-13 03:53:35 +01:00
parent 9167035ad9
commit 54f1343ca2

View File

@@ -246,7 +246,9 @@ NSString* const FolderOptionsDefaultsKey = @"Folder Search Options";
{
auto const settings = settings_for_path(NULL_STR, "", to_s(controller.searchFolder));
globs.add_exclude_glob(settings.get(kSettingsExcludeDirectoriesInFolderSearchKey, NULL_STR), path::kPathItemDirectory);
globs.add_exclude_glob(settings.get(kSettingsExcludeDirectoriesKey, NULL_STR), path::kPathItemDirectory);
globs.add_exclude_glob(settings.get(kSettingsExcludeFilesInFolderSearchKey, NULL_STR), path::kPathItemFile);
globs.add_exclude_glob(settings.get(kSettingsExcludeFilesKey, NULL_STR), path::kPathItemFile);
for(auto key : { kSettingsExcludeInFolderSearchKey, kSettingsExcludeKey, kSettingsBinaryKey })
globs.add_exclude_glob(settings.get(key, NULL_STR));
globs.add_include_glob(controller.searchHiddenFolders ? "{,.}*" : "*", path::kPathItemDirectory);