Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2009-09-21 08:03:07 -0500
committerDan McGee <dan@archlinux.org>2009-09-21 08:03:07 -0500
commite6efd1932b4df1fd7ee8130268abf80d8bd4a151 (patch)
treeaabe93351d4b37a8116ce53608171feaa2d00b37
parent72883e3bcbc1ff2d46667fceb48c3c2c682cfe79 (diff)
Add missing closedir calls in cache cleanup
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--src/pacman/sync.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index aa09117e..837c2b3d 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -93,11 +93,12 @@ static int sync_cleandb(const char *dbpath, int keep_used) {
if(rmrf(path)) {
pm_fprintf(stderr, PM_LOG_ERROR,
_("could not remove repository directory\n"));
+ closedir(dir);
return(1);
}
}
-
}
+ closedir(dir);
return(0);
}
@@ -215,6 +216,7 @@ static int sync_cleancache(int level)
unlink(path);
}
}
+ closedir(dir);
} else {
/* full cleanup */
printf(_("Cache directory: %s\n"), cachedir);