mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-25 17:36:26 -05:00
Reduces the permission to stat files in Windows.
Check explicitely to have read permission in scanning.
This commit is contained in:
parent
5a2e118c38
commit
64f4d59adb
4 changed files with 13 additions and 4 deletions
7
scan.c
7
scan.c
|
|
@ -226,6 +226,13 @@ static void scan_dir(struct snapraid_scan* scan, struct snapraid_state* state, s
|
|||
|
||||
if (S_ISREG(st.st_mode)) {
|
||||
if (filter_path(&state->filterlist, sub_next, 0) == 0) {
|
||||
/* check for having read permission */
|
||||
if (access(path_next, R_OK) != 0) {
|
||||
fprintf(stderr, "You do not have read permissions for file '%s'\n", path_next);
|
||||
fprintf(stderr, "Fix the permissions or exclude it in the configuration with:\n\texclude /%s\n", sub_next);
|
||||
fprintf(stderr, "or exclude the whole directory with:\n\texclude /%s\n", sub);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
scan_file(scan, state, disk, sub_next, &st);
|
||||
} else {
|
||||
if (state->verbose) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue