Skip deltas and partial downloads in package cleanup

This affects -Sc only, not -Scc.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2012-07-10 23:14:40 -05:00
parent 3fb934b59a
commit cc6fb2e8a7
1 changed files with 10 additions and 0 deletions

View File

@ -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);