From 20bb1af58983d913e0740f5897ba7bf71f94eeb1 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 9 Jun 2012 10:05:29 +0200 Subject: [PATCH] xbps_remove_pkg: return proper error if metadata files cannot be removed. --- lib/package_remove.c | 2 ++ 1 file changed, 2 insertions(+) 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; }