Three cases need to be considered:
- The file system supports hard links created by
- The file system does not support
link(). This is covered by calling
- The file system does not support hard links, however it makes
a copy instead when
The third case is not covered yet:
link() generates the file, but
this is not noticed and in turn making a copy in
fails, as the file already exists. The loop generates files until
MAX_TRIES is reached.
The commit checks if 'result' exists after calling
link() and covers
the last case which is needed to support home directories on sshfs.
Corresponding issue: #84