summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-07-10 23:14:40 -0500
committerDan McGee <dan@archlinux.org>2012-08-01 09:14:32 -0500
commitcc6fb2e8a78e6d0ca9bfc778298b1dc095af7db4 (patch)
tree59755f66e320b715fd7c7579ccd07a6d9f6cad6c /src
parent3fb934b59a2a29c69214ef2578844340cfcde9f9 (diff)
Skip deltas and partial downloads in package cleanup
This affects -Sc only, not -Scc. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/sync.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 3b094854..0b9e790f 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -239,6 +239,16 @@ static int sync_cleancache(int level)
continue;
}
+ /* skip package deltas, we aren't smart enough to clean these yet */
+ if(fnmatch("*.delta", ent->d_name, 0) == 0) {
+ continue;
+ }
+
+ /* skip any partial downloads */
+ if(fnmatch("*.part", ent->d_name, 0) == 0) {
+ continue;
+ }
+
/* build the full filepath */
snprintf(path, PATH_MAX, "%s%s", cachedir, ent->d_name);