X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwgtpkg-uninstall.c;fp=src%2Fwgtpkg-uninstall.c;h=6156c0a2f14f081b98697c7ff75ecad60d20d86d;hb=bb4cd6174006925a71baf6596b32e2d1dec26171;hp=653aea729fb98ddd81aea093a4cc0e99af6e9f28;hpb=aefa15cde960ca4528d415337bbeb8e5f0072e44;p=src%2Fapp-framework-main.git diff --git a/src/wgtpkg-uninstall.c b/src/wgtpkg-uninstall.c index 653aea7..6156c0a 100644 --- a/src/wgtpkg-uninstall.c +++ b/src/wgtpkg-uninstall.c @@ -87,8 +87,8 @@ int uninstall_widget(const char *idaver, const char *root) rc = snprintf(path, sizeof path, "%s/%s", FWK_ICON_DIR, idaver); assert(rc < (int)sizeof path); rc = unlink(path); - if (rc < 0) - ERROR("can't removing '%s': %m", path); + if (rc < 0 && errno != ENOENT) + ERROR("can't remove '%s': %m", path); /* removes the parent directory if empty */ rc2 = snprintf(path, sizeof path, "%s/%s", root, id); @@ -97,7 +97,7 @@ int uninstall_widget(const char *idaver, const char *root) if (rc < 0 && errno == ENOTEMPTY) return rc; if (rc < 0) { - ERROR("error while removing directory '%s': %m", path); + ERROR("while removing directory '%s': %m", path); return -1; }