Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
Description
reactos-bootcd-0.4.15-dev-6846-gb3c1f65-x86-gcc-lin-dbg
- Install Filezilla, K-Meleon, Firefox 48
- Uninstall FF 48 from RAPPS interface
- Refresh (F5)
- Firefox 48 is still listed (while no longer prensent) and wrong icon is used
- Same behavior when "renaming" or "removing" the file where the icon is supposed to be extracted then launching RAPPS (see below due to wrong assumption on ExtractIconW returned value on missing files)
and when "last" element is uninstalled, a "blank" icon is displayed while default icon (IDI_MAIN) is expected : https://git.reactos.org/?p=reactos.git;a=blob;f=base/applications/rapps/appview.cpp;hb=fa4b38d902d13072b7b982a4411a31cb84ab24b3#l1305
Faulty code : https://git.reactos.org/?p=reactos.git;a=blob;f=base/applications/rapps/appview.cpp;hb=fa4b38d902d13072b7b982a4411a31cb84ab24b3#l1292 from learn_more in https://github.com/reactos/reactos/commit/33c2903e6d4fda32215f553c2189c13d52ed31de
err:(win32ss/user/user32/windows/cursoricon.c:1906) GetIconInfo failed. |
ExtractIconW does not return NULL on non-existing file. See MSDN
The return value is a handle to an icon. If the file specified was not an executable file, DLL, or icon file, the return is 1. If no icons were found in the file, the return value is NULL. |
Local fix by patch : rapps.patchsee below, current default icon when Armagetron main file is not present
This patch checks for existence with GetFileAttributesW. One alternative could be to compare (!hIcon || (hIcon == 1)) as a condition to switch to default icon
Better patch : rapps_v2.patch