aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThorsten Töpper <atsutane@freethoughts.de>2026-02-24 23:52:29 +0100
committerThorsten Töpper <atsutane@freethoughts.de>2026-02-24 23:52:29 +0100
commit819779a68bc6da0c3d298efe52e3b1ca0d2e66cf (patch)
tree42cc7ce6203a12cbf2bb8fe45b67ef2029351459 /src
parent9230578c5bb4ee0e3e08ce432a7f07b9b967c0b8 (diff)
downloadduplicate_finder-819779a68bc6da0c3d298efe52e3b1ca0d2e66cf.tar.gz
duplicate_finder-819779a68bc6da0c3d298efe52e3b1ca0d2e66cf.tar.bz2
By default suppress unrequired output when doing analysis
Diffstat (limited to 'src')
-rw-r--r--src/duplicate_finder.c8
-rw-r--r--src/options.c4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/duplicate_finder.c b/src/duplicate_finder.c
index f410f59..c6843f0 100644
--- a/src/duplicate_finder.c
+++ b/src/duplicate_finder.c
@@ -44,10 +44,12 @@ int analyze_db_content() {
}
- /* TODO: Implementation of several SQL queries... not in the mood */
- dbi_print_fileinfo_resolved(stdout);
+ if (option_show_non_duplicates) {
+ dbi_print_fileinfo_resolved(stdout);
+ printf("\n\n");
+ }
- printf("\n\n---- IDENTICAL HASHES ----\n\n");
+ printf("---- IDENTICAL HASHES ----\n\n");
if (dbi_print_identical_hashes(stdout) < 0) {
LOGERR("ERROR: Identification of duplicates via hashes failed.\n");
diff --git a/src/options.c b/src/options.c
index 3f226d3..3c8023c 100644
--- a/src/options.c
+++ b/src/options.c
@@ -30,6 +30,7 @@ enum operation_modes option_mode = MODE_DEV_MESSED_UP;
bool option_clean_kv = false;
bool option_quiet = false;
bool option_show_hidden_entries = false;
+bool option_show_non_duplicates = false;
char *option_gdbm_db_name = "/tmp/duplicate_finder.gdbm";
char *option_sqlite_db_name = "duplicate_finder.sqlite";
@@ -42,7 +43,7 @@ void usage(char *executable) {
fprintf(stderr, "\nOPTIONS are\n");
/* long name, short name, optional argument, explanation */
fprintf(stderr, " %-25s %2s %10s - %s\n", "--all", "-a", "",
- "Also process and show files hidden on the filesystem");
+ "Different per command, scan includes hidden files, analyze shows every db entry before analysis");
fprintf(stderr, " %-25s %2s %10s - %s\n", "--database", "-d", "",
"fullname of the sqlite db to be used");
fprintf(stderr, " %-25s %2s %10s - %s\n", "--help", "-h", "",
@@ -63,6 +64,7 @@ void set_option(const char *option_name, char *option_argument) {
if (strcmp("all", option_name) == 0) {
option_show_hidden_entries = true;
+ option_show_non_duplicates = true;
return;
}
if (option_name == NULL)