Merge pull request #8614 from ShamrockLee/quickfix-exdev

linkOrCopy: Fallback upon cross-device link error (EXDEV)
This commit is contained in:
Eelco Dolstra 2023-06-30 16:42:42 +02:00 committed by GitHub
commit 7b5ca7ebe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -395,8 +395,9 @@ static void linkOrCopy(const Path & from, const Path & to)
bind-mount in this case?
It can also fail with EPERM in BeegFS v7 and earlier versions
or fail with EXDEV in OpenAFS
which don't allow hard-links to other directories */
if (errno != EMLINK && errno != EPERM)
if (errno != EMLINK && errno != EPERM && errno != EXDEV)
throw SysError("linking '%s' to '%s'", to, from);
copyPath(from, to);
}