diff options
Diffstat (limited to 'src/audit.c')
-rw-r--r-- | src/audit.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/audit.c b/src/audit.c index 7a34f15..2c5a17a 100644 --- a/src/audit.c +++ b/src/audit.c @@ -46,7 +46,7 @@ static int audit_directory(apk_hash_item item, void *ctx) snprintf(tmp, sizeof(tmp), "%s/%s", dbd->name, de->d_name); - if (apk_file_get_info(tmp, &fi) < 0) + if (apk_file_get_info(tmp, APK_CHECKSUM_NONE, &fi) < 0) continue; if (S_ISDIR(fi.mode)) { @@ -57,8 +57,10 @@ static int audit_directory(apk_hash_item item, void *ctx) } else { dbf = apk_db_file_query(db, bdir, APK_BLOB_STR(de->d_name)); if (dbf != NULL) { - if (apk_blob_compare(APK_BLOB_BUF(fi.csum), - APK_BLOB_BUF(dbf->csum)) == 0) + if (apk_file_get_info(tmp, dbf->csum.type, &fi) < 0) + continue; + + if (apk_checksum_compare(&fi.csum, &dbf->csum) == 0) continue; reason = 'U'; |