mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 23:16:28 -05:00
Add build option to allow hardlink tools
This commit is contained in:
parent
fdadb443ad
commit
68525d6fa5
3 changed files with 14 additions and 2 deletions
|
|
@ -262,12 +262,14 @@ static int verify_executable(const char* exec_path, char* resolved_path)
|
|||
return -1;
|
||||
}
|
||||
|
||||
#if !HAVE_HARDLINK_TOOLS
|
||||
/* verify the file has not been hardlinked multiple times */
|
||||
if (st.st_nlink > 1) {
|
||||
log_error(EINVAL, "File %s has multiple hard links", resolved_path);
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue