Fixed --gui-threshold logic
Some checks failed
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL Advanced / Analyze (c-cpp) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled

This commit is contained in:
Andrea Mazzoleni 2026-04-20 00:42:48 +02:00
parent 06341ba742
commit 34b6a47e5e
2 changed files with 9 additions and 2 deletions

View file

@ -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);
}