From cd8b331a307ca043f6ec2f5998d3b0694b0d0b05 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 27 Sep 2026 20:17:26 +0200 Subject: [PATCH] Document why automatic copy search runs before snapshot selection --- cmdline/snapraid.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmdline/snapraid.c b/cmdline/snapraid.c index e5a53d98..3980abb3 100644 --- a/cmdline/snapraid.c +++ b/cmdline/snapraid.c @@ -1777,7 +1777,12 @@ int snapraid_main(int argc, char* argv[]) if (import_content != 0) state_import(&state, import_content); - /* import from all the array */ + /* + * Search the live array before switching reference disks to snapshots. + * The search is intended to find files copied or moved since the last sync; + * snapshots are instead used later for the historical state matching parity. + * Keep this before state_snapshot_write(), or recent live copies may be missed. + */ if (!state.opt.force_nocopy) state_search_array(&state); }