Do not printf a warning if remove(3) returns EEXIST/ENOTEMPTY/EBUSY.

This commit is contained in:
Juan RP
2011-02-25 10:51:43 +01:00
parent 777a91f62a
commit 9759a62e3f
2 changed files with 13 additions and 10 deletions

View File

@ -153,10 +153,11 @@ xbps_remove_pkg_files(prop_dictionary_t dict, const char *key)
* Remove the object if possible.
*/
if (remove(path) == -1) {
if (xhp->flags & XBPS_FLAG_VERBOSE)
if (errno != EEXIST &&
errno != ENOTEMPTY &&
errno != EBUSY)
xbps_warn_printf("can't remove %s `%s': %s\n",
curobj, file, strerror(errno));
} else {
/* Success */
if (xhp->flags & XBPS_FLAG_VERBOSE)