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

@ -1437,7 +1437,7 @@ static int scan_sub(struct snapraid_scan* scan, int level, int is_diff, char* pa
}
/* exclude snapshot container even before calling lstat() */
if (filter_snapshot(sub_next, name) != 0) {
if (filter_snapshot(state->snapshot, sub_next, name) != 0) {
msg_verbose("Excluding snapshots directory '%s'\n", path_next);
continue;
}