mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-25 01:16:31 -05:00
Adds support for hardlinks.
This commit is contained in:
parent
a5aa964f8f
commit
501e8e7ec3
2 changed files with 11 additions and 3 deletions
11
scan.c
11
scan.c
|
|
@ -124,8 +124,13 @@ static void scan_file(struct snapraid_scan* scan, struct snapraid_state* state,
|
|||
if (file) {
|
||||
/* check if multiple files have the same inode */
|
||||
if (file->is_present) {
|
||||
fprintf(stderr, "Internal inode '%llu' inconsistency for file '%s'\n", inode, sub);
|
||||
exit(EXIT_FAILURE);
|
||||
if (st->st_nlink > 1) {
|
||||
printf("warning: Ignored hardlink '/%s'\n", sub);
|
||||
return;
|
||||
} else {
|
||||
fprintf(stderr, "Internal inode '%llu' inconsistency for file '%s'\n", inode, sub);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
/* check if the file is not changed */
|
||||
|
|
@ -255,7 +260,7 @@ static void scan_dir(struct snapraid_scan* scan, struct snapraid_state* state, s
|
|||
}
|
||||
} else {
|
||||
if (state->verbose) {
|
||||
printf("warning: Ignored file '/%s'\n", sub_next);
|
||||
printf("warning: Ignored special file '/%s'\n", sub_next);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue