diff options
Diffstat (limited to 'src/database_interaction.c')
| -rw-r--r-- | src/database_interaction.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 */ |
