diff --git a/lib/package_remove.c b/lib/package_remove.c index 274c91a5..eedcfbe8 100644 --- a/lib/package_remove.c +++ b/lib/package_remove.c @@ -121,6 +121,8 @@ remove_pkg_metadata(const char *pkgname, (void)closedir(dirp); rv = rmdir(metadir); free(metadir); + if (rv != 0) + rv = errno; return rv; }