From b5e349ec046d40b1319357e07998b76d6df2911b Mon Sep 17 00:00:00 2001 From: Thorsten Töpper Date: Sun, 1 Mar 2026 21:43:36 +0100 Subject: Fixes --- src/database_interaction.c | 4 ++-- src/file_processor.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/database_interaction.c b/src/database_interaction.c index 6f781aa..7bf5d00 100644 --- a/src/database_interaction.c +++ b/src/database_interaction.c @@ -951,7 +951,7 @@ int dbi_fill_fileinfo(struct df_fileinfo *fi) { /* Abort if no matching entry in the table */ existing_entry = dbi_select_fileinfo_by_path_filename_ids(pname_id, fname_id); - if (existing_entry < 0) { + if (existing_entry <= 0) { fi->id = 0; return 0; } @@ -1039,7 +1039,7 @@ int dbi_select_fileinfo_by_id_resolved(int64_t id, struct df_fileinfo *fi) { fi->hashes.sha512[DF_STR_SIZE_512] = '\0'; /* array has the additional nul byte space */ /* Ignore the item 5 from the query, it's the filesize we have in the stat struct */ - + fi->last_seen = (time_t) sqlite3_column_int64(st, 6); /* last_seen */ /* struct stat statbuf */ diff --git a/src/file_processor.c b/src/file_processor.c index 9e12c52..c91e223 100644 --- a/src/file_processor.c +++ b/src/file_processor.c @@ -221,7 +221,7 @@ 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 + * 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; @@ -236,7 +236,7 @@ int process_file(struct df_fileinfo *info) { dbi_update_fileinfo_last_seen(info_from_db.id); return 1; } - + if ((ctx_pkg = init_md_components()) == NULL) { LOGERR("ERROR: Failed to initialize/create md contexts to be used with %s\n", -- cgit v1.3