From 2bf2617203e2dded958bdf2f0e1825b689e2f83c Mon Sep 17 00:00:00 2001 From: Thorsten Töpper Date: Mon, 2 Mar 2026 19:16:10 +0100 Subject: hash calculation: new parameter --force-scan --- src/file_processor.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/file_processor.c') diff --git a/src/file_processor.c b/src/file_processor.c index c91e223..d689635 100644 --- a/src/file_processor.c +++ b/src/file_processor.c @@ -222,10 +222,11 @@ int process_file(struct df_fileinfo *info) { /* filesystem information collected check whether the DB has a corresponding value, * if so check by size and time whether it looks modified if not, skip - * TODO: option_force needs to be implemented AND memory clean up*/ + */ info_from_db.path = info->path; info_from_db.name = info->name; - if ((dbi_fill_fileinfo(&info_from_db) == 0) && + if ( ! option_force_scan && + (dbi_fill_fileinfo(&info_from_db) == 0) && (info->statbuf.st_size == info_from_db.statbuf.st_size) && (info->statbuf.st_mtim.tv_sec < info_from_db.last_seen) && (info->statbuf.st_mtim.tv_sec == info_from_db.statbuf.st_mtim.tv_sec) && @@ -385,7 +386,7 @@ int process_gdbm_content() { /* file? already processed? */ if (kv_get_type(key) == 'D' || kv_get_bool(key)) { - DBGTRC("DEBUG: Skip\n"); + DBGTRC("DEBUG: Skip directory\n"); tmpkey = key; key = kv_next_key(tmpkey); free(tmpkey); -- cgit v1.3