aboutsummaryrefslogtreecommitdiff
path: root/src/duplicate_finder.c
diff options
context:
space:
mode:
authorThorsten Töpper <atsutane@freethoughts.de>2026-02-24 23:01:40 +0100
committerThorsten Töpper <atsutane@freethoughts.de>2026-02-24 23:01:40 +0100
commita3b5ddabd37cce398e84f0e98fa9c3318ee8df86 (patch)
tree5b4668ca1becd73f267e440c5104499d4ac69e1a /src/duplicate_finder.c
parent7bf6433757541981c87305ad747fd88316936304 (diff)
downloadduplicate_finder-a3b5ddabd37cce398e84f0e98fa9c3318ee8df86.tar.gz
duplicate_finder-a3b5ddabd37cce398e84f0e98fa9c3318ee8df86.tar.bz2
Identify duplicates by identical hash sets.
Diffstat (limited to 'src/duplicate_finder.c')
-rw-r--r--src/duplicate_finder.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/duplicate_finder.c b/src/duplicate_finder.c
index dae7832..8a058fd 100644
--- a/src/duplicate_finder.c
+++ b/src/duplicate_finder.c
@@ -47,6 +47,14 @@ int analyze_db_content() {
/* TODO: Implementation of several SQL queries... not in the mood */
dbi_print_fileinfo_resolved(stdout);
+ printf("\n\n---- IDENTICAL HASHES ----\n\n");
+
+ if (dbi_print_identical_hashes(stdout) < 0) {
+ LOGERR("ERROR: Identification of duplicates via hashes failed.\n");
+ dbi_close();
+ return EXIT_FAILURE;
+ }
+
dbi_close();
return EXIT_SUCCESS;
}
@@ -96,8 +104,12 @@ int main(int argc, char **argv) {
return EXIT_FAILURE;
}
+ DBGTRC("Database: %s\n", option_sqlite_db_name);
+ DBGTRC("KVStorage: %s\n", option_gdbm_db_name);
+
+
if (option_mode == MODE_SCAN) {
- return scan((path_index == argc) ? argv[path_index] : ".");
+ return scan((path_index == argc) ? "." : argv[path_index] );
}
if (option_mode == MODE_ANALYZE_DB) {