mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 06:56:28 -05:00
If O_NOATIME use fails with EPERM, retry without it.
This commit is contained in:
parent
db6ff47062
commit
2d6528fe90
4 changed files with 25 additions and 14 deletions
2
check.c
2
check.c
|
|
@ -1002,7 +1002,7 @@ static int state_check_process(struct snapraid_state* state, int check, int fix,
|
|||
}
|
||||
|
||||
/* create it */
|
||||
/* do not follow links to ensure to open the real file */
|
||||
/* O_NOFOLLOW: do not follow links to ensure to open the real file */
|
||||
f = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_NOFOLLOW, 0600);
|
||||
if (f == -1) {
|
||||
fprintf(stderr, "Error creating empty file '%s'. %s.\n", path, strerror(errno));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue