ignore unexpected exceptions while extracting icons

svn path=/branches/lean-explorer/; revision=10134
This commit is contained in:
Martin Fuchs
2004-07-15 21:04:20 +00:00
parent e92def1b07
commit bb344f6544
2 changed files with 11 additions and 3 deletions
@@ -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
@@ -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();