mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Ensure .snapraidignore rules are loaded when nohidden is enabled
This commit is contained in:
parent
35977dadc9
commit
6724ed7160
1 changed files with 10 additions and 3 deletions
|
|
@ -1409,10 +1409,17 @@ static int scan_sub(struct snapraid_scan* scan, int level, int is_diff, char* pa
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* exclude hidden files even before calling lstat() */
|
||||
/*
|
||||
* Exclude hidden files even before calling lstat().
|
||||
* Note that .snapraidignore is an exception because it is a control file
|
||||
* that defines local exclusion rules, and must also be preserved as array
|
||||
* data so that exclusion rules survive disaster recovery.
|
||||
*/
|
||||
if (filter_hidden(state->filter_hidden, dd) != 0) {
|
||||
msg_verbose("Excluding hidden '%s'\n", path_next);
|
||||
continue;
|
||||
if (strcmp(".snapraidignore", dd->d_name) != 0) {
|
||||
msg_verbose("Excluding hidden '%s'\n", path_next);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* exclude content files even before calling lstat() */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue