From cc6fb2e8a78e6d0ca9bfc778298b1dc095af7db4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 10 Jul 2012 23:14:40 -0500 Subject: Skip deltas and partial downloads in package cleanup This affects -Sc only, not -Scc. Signed-off-by: Dan McGee --- src/pacman/sync.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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); -- cgit v1.2.3