diff --git a/lib/transaction_files.c b/lib/transaction_files.c index 625e5dcb..9dd4a769 100644 --- a/lib/transaction_files.c +++ b/lib/transaction_files.c @@ -183,6 +183,7 @@ can_delete_directory(struct xbps_handle *xhp, const char *file, size_t len, size xbps_dbg_printf(xhp, "[files] only removed %zu out of %zu files: %s\n", rmcount, fcount, file); } + closedir(dp); return fcount <= rmcount; }