end2endzone / ShellAnything

ShellAnything is a C++ open-source software which allow one to easily customize and add new options to *Windows Explorer* context menu. Define specific actions when a user right-click on a file or a directory.
MIT License
180 stars 27 forks source link

Fails to identify icon for HTML files #164

Closed end2endzone closed 3 weeks ago

end2endzone commented 3 weeks ago

Describe the bug ShellAnything fails to identify the icon for *.html files.

To Reproduce Create a menu which shows the following icon:

<icon fileextensions="html" />

and the following error is displayed in the logs:

W0824 10:42:25.818912 23444 Icon.cpp:114] Failed to find icon for file extension 'html'. Resolving icon with default icon for unknown file type 'C:\Windows\system32\imageres.dll' with index '2'

Expected behavior The icon for an HTML file should be the easiest to resolves.

Screenshots N/A

Environment

Additional context Add any other context about the problem here.

end2endzone commented 3 weeks ago

The actual Win32Registry::GetFileTypeIcon() implementation resolves the icon to the following on my system: %ProgramFiles%\Internet Explorer\iexplore.exe,-17.

This is far from perfect. If should actually resolves to the Google Chrome icon. EDIT: --> Moved to its specific issue. See issue #167

However, since the recent change to the implementation of Icon::IsValid(), introduced while fixing #150 (we previously had this implementation), icons with negative index are now reported as invalid icon.

end2endzone commented 3 weeks ago

TODO: