From 34b6a47e5ebc1ec18abb7f6f116ac497ba93113b Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 20 Apr 2026 00:42:48 +0200 Subject: [PATCH] Fixed --gui-threshold logic --- HISTORY | 7 +++++++ cmdline/snapraid.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 796dd68b..c538d282 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,13 @@ SnapRAID HISTORY ================ +14.4 2026/04 +============ + * Updated --gui-threshold-* logic to trigger on values equal to or greater + than the threshold (previously only "greater than"). This enables setting + the threshold to 1 to trigger it for a single case. + This change is required by SnapRAID Daemon 1.8. + 14.3 2026/04 ============ * On ARM64 (AArch64), replaced the inline assembly implementation of diff --git a/cmdline/snapraid.c b/cmdline/snapraid.c index 8a98a702..d3017e06 100644 --- a/cmdline/snapraid.c +++ b/cmdline/snapraid.c @@ -1861,11 +1861,11 @@ int snapraid_main(int argc, char* argv[]) state_scan(&state); - if (opt.gui_threshold_removes != 0 && state.removed_files > opt.gui_threshold_removes) { + if (opt.gui_threshold_removes != 0 && state.removed_files >= opt.gui_threshold_removes) { log_fatal(EUSER, "Too many files were removed (%u, limit is %u). Sync aborted.\n", state.removed_files, opt.gui_threshold_removes); exit(EXIT_SYNC_NEEDED); } - if (opt.gui_threshold_updates != 0 && state.updated_files > opt.gui_threshold_updates) { + if (opt.gui_threshold_updates != 0 && state.updated_files >= opt.gui_threshold_updates) { log_fatal(EUSER, "Too many files were updated (%u, limit is %u). Sync aborted.\n", state.updated_files, opt.gui_threshold_updates); exit(EXIT_SYNC_NEEDED); }