From 215aed17e77d3029fc4c2fe9f2eff935ceda4096 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 14 Sep 2026 23:26:54 +0200 Subject: [PATCH] Emit content read metadata only after successful content loading --- cmdline/state.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmdline/state.c b/cmdline/state.c index 97390586..16124b31 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -5076,12 +5076,6 @@ void state_read(struct snapraid_state* state) /* LCOV_EXCL_STOP */ } - if (!state->no_conf) { - log_tag("content:%s\n", esc_tag(path)); - log_tag("content_info:read_unixtime:%" PRId64 "\n", (int64_t)st.st_mtime); - log_flush(); - } - /* go further to check other content files */ while (node) { char other_path[PATH_MAX]; @@ -5168,6 +5162,12 @@ void state_read(struct snapraid_state* state) state_content_check(state, path); + if (!state->no_conf) { + log_tag("content:%s\n", esc_tag(path)); + log_tag("content_info:read_unixtime:%" PRId64 "\n", (int64_t)st.st_mtime); + log_flush(); + } + /* mark that we read the content file, and it passed all the checks */ state->checked_read = 1; }