ignore unexpected exceptions while extracting icons
authorMartin Fuchs <fuchs.martin@gmail.com>
Thu, 15 Jul 2004 21:04:20 +0000 (21:04 +0000)
committerMartin Fuchs <fuchs.martin@gmail.com>
Thu, 15 Jul 2004 21:04:20 +0000 (21:04 +0000)
svn path=/branches/lean-explorer/; revision=10134

reactos/subsys/system/explorer/shell/shellfs.cpp
reactos/subsys/system/explorer/taskbar/startmenu.cpp

index e4f1ab9..f6cf372 100644 (file)
@@ -305,7 +305,11 @@ void ShellDirectory::read_directory(int scan_flags)
                                if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                                        entry->_icon_id = ICID_FOLDER;
                                else if (scan_flags & SCAN_EXTRACT_ICONS)
-                                       entry->extract_icon();
+                                       try {
+                                               entry->extract_icon();
+                                       } catch(COMException&) {
+                                               // ignore unexpected exceptions while extracting icons
+                                       }
 
                                last = entry;
                        } while(FindNextFile(hFind, &w32fd));
@@ -407,7 +411,11 @@ void ShellDirectory::read_directory(int scan_flags)
                                        if (!(entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ||
                                                !(attribs & SFGAO_FILESYSTEM)) {
                                                if (scan_flags & SCAN_EXTRACT_ICONS)
-                                                       entry->extract_icon();
+                                                       try {
+                                                               entry->extract_icon();
+                                                       } catch(COMException&) {
+                                                               // ignore unexpected exceptions while extracting icons
+                                                       }
                                        } else if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                                                entry->_icon_id = ICID_FOLDER;
                                        else
index 48cc327..cd39178 100644 (file)
@@ -154,7 +154,7 @@ HWND StartMenu::Create(int x, int y, const StartMenuFolders& folders, HWND hwndP
 }
 
 
-LRESULT        StartMenu::Init(LPCREATESTRUCT pcs)
+LRESULT StartMenu::Init(LPCREATESTRUCT pcs)
 {
        try {
                AddEntries();