db: purge temporary files without explicit modification check
When extraction failed, the user has had no opportunity to edit any files. Just clean up.cute-signatures
parent
5c0c249b78
commit
d441cf523c
|
@ -2657,7 +2657,8 @@ static void apk_db_purge_pkg(struct apk_database *db,
|
|||
.filename = APK_BLOB_PTR_LEN(file->name, file->namelen),
|
||||
};
|
||||
hash = apk_blob_hash_seed(key.filename, diri->dir->hash);
|
||||
if ((diri->dir->protect_mode == APK_PROTECT_NONE) ||
|
||||
if (!is_installed ||
|
||||
(diri->dir->protect_mode == APK_PROTECT_NONE) ||
|
||||
(db->ctx->flags & APK_PURGE) ||
|
||||
(file->csum.type != APK_CHECKSUM_NONE &&
|
||||
apk_fileinfo_get(db->root_fd, name, APK_FI_NOFOLLOW | APK_FI_DIGEST(apk_dbf_digest(file)), &fi, &db->atoms) == 0 &&
|
||||
|
|
Loading…
Reference in New Issue