summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-22 16:00:14 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-22 16:00:14 +0300
commit23582a0ec5e52489c22c15a1a77f32de514cf5d9 (patch)
treefb010a03de7452c2db84d242c40a213f3e4e1dcf
parent93f0b3524c1263b99a1a4bf718c27e6ad7b6aea8 (diff)
downloadapk-tools-23582a0ec5e52489c22c15a1a77f32de514cf5d9.tar.gz
apk-tools-23582a0ec5e52489c22c15a1a77f32de514cf5d9.tar.bz2
apk-tools-23582a0ec5e52489c22c15a1a77f32de514cf5d9.tar.xz
apk-tools-23582a0ec5e52489c22c15a1a77f32de514cf5d9.zip
db: honour clean-protected flag again
-rw-r--r--src/database.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index 42de1b6..b27df99 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1493,7 +1493,8 @@ static void apk_db_migrate_files(struct apk_database *db,
if (ofile == NULL ||
ofile->csum.type != file->csum.type)
apk_file_get_info(name, file->csum.type, &fi);
- if (apk_checksum_compare(&file->csum, &fi.csum) == 0)
+ if ((apk_flags & APK_CLEAN_PROTECTED) ||
+ apk_checksum_compare(&file->csum, &fi.csum) == 0)
unlink(tmpname);
} else {
/* Overwrite the old file */