Fix uninstall of widgets without icons 81/24581/1 9.0.2 icefish/9.0.2 icefish_9.0.2
authorScott Murray <scott.murray@konsulko.com>
Thu, 28 May 2020 19:51:05 +0000 (15:51 -0400)
committerScott Murray <scott.murray@konsulko.com>
Thu, 28 May 2020 19:51:05 +0000 (15:51 -0400)
commit7084f123b4f8a704ae2bc35b5fe9433f767439fe
treee6ae5f4c2503355c5c0dcf37599b369084e4e129
parent61fddd3f281061a93a13e4e14e75b80925816684
Fix uninstall of widgets without icons

Trying to uninstall a widget without an icon would remove the widget
files, but report an error, and the widget would not be removed from
the database until a reboot, preventing installation of a new version.

To fix this, the error handling in uninstall_widget has been reworked
to only explicitly return an error when the unlink of the icon file
fails for reasons other than the file not being present. This then
allows some code cleanup by removing the extra rc2 variable and fixing
some error checks where rc and rc2 were being mixed.

Bug-AGL: SPEC-3401

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ia86805bd814e787b7e47c489973ee974fff4b6d3
src/wgtpkg-uninstall.c