small optimization for the last change
Modified: branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.cpp
Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp

Modified: branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.cpp
--- branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.cpp	2005-05-03 08:04:58 UTC (rev 14955)
+++ branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.cpp	2005-05-03 09:21:42 UTC (rev 14956)
@@ -250,7 +250,8 @@
 
 		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) {
@@ -259,10 +260,9 @@
 		//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)

Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp
--- trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp	2005-05-03 08:04:58 UTC (rev 14955)
+++ trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp	2005-05-03 09:21:42 UTC (rev 14956)
@@ -252,7 +252,8 @@
 
 		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 @@
 		//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)