Exclude snapshot directory only when snapshot mode is enabled

This commit is contained in:
Andrea Mazzoleni 2026-08-14 09:47:12 +02:00
parent a8a94bb950
commit 3e71e68848
4 changed files with 7 additions and 4 deletions

View file

@ -192,7 +192,7 @@ static void search_dir(struct snapraid_state* state, struct snapraid_disk* disk,
}
/* exclude snapshot container even before calling lstat() */
if (disk != 0 && filter_snapshot(sub, name) != 0) {
if (disk != 0 && filter_snapshot(state->snapshot, sub, name) != 0) {
msg_verbose("Excluding snapshots directory '%s'\n", path_next);
continue;
}