small optimization for the last change

svn path=/trunk/; revision=14956
This commit is contained in:
Martin Fuchs 2005-05-03 09:21:42 +00:00
parent 63415000fe
commit 7b8809480b

View file

@ -252,7 +252,8 @@ void StartMenu::AddShellEntries(const ShellDirectory& dir, int max, const String
if (_tcsicmp(trim_path_slash(dir_path), trim_path_slash(ignore_path)))
*ignore_name = '\0';
}
} else
*ignore_name = '\0';
int cnt = 0;
for(Entry*entry=dir._down; entry; entry=entry->_next) {
@ -261,10 +262,9 @@ void StartMenu::AddShellEntries(const ShellDirectory& dir, int max, const String
//not appropriate for drive roots: if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
continue;
// hide subfolders if requested
if (!ignore.empty())
if (*ignore_name && !_tcsicmp(entry->_data.cFileName, ignore_name))
continue;
// hide "Programs" subfolders if requested
if (*ignore_name && !_tcsicmp(entry->_data.cFileName, ignore_name))
continue;
// only 'max' entries shall be added.
if (++cnt == max)