Don't print the "Nothing to do" if the state was updated
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL / Analyze (push) Waiting to run

This commit is contained in:
Andrea Mazzoleni 2025-10-13 00:20:36 +02:00
parent c1e101699a
commit 467fb8c1ac
2 changed files with 8 additions and 1 deletions

View file

@ -141,6 +141,7 @@ void state_init(struct snapraid_state* state)
state->filter_hidden = 0;
state->autosave = 0;
state->need_write = 0;
state->written = 0;
state->checked_read = 0;
state->block_size = 256 * KIBI; /* default 256 KiB */
state->raid_mode = RAID_MODE_CAUCHY;
@ -4213,6 +4214,7 @@ void state_write(struct snapraid_state* state)
state->need_write = 0; /* no write needed anymore */
state->checked_read = 0; /* what we wrote is not checked in read */
state->written = 1;
}
void state_skip(struct snapraid_state* state)
@ -4380,7 +4382,11 @@ void state_progress_end(struct snapraid_state* state, block_off_t countpos, bloc
log_tag("run:end\n");
log_flush();
} else if (countmax == 0) {
msg_status("Nothing to do\n");
if (state->need_write || state->written) {
msg_status("100%% completed\n");
} else {
msg_status("Nothing to do\n");
}
} else {
time_t now;
time_t elapsed;