diff options
author | Colin Walters <walters@verbum.org> | 2015-05-25 09:46:02 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-05-25 09:46:02 -0400 |
commit | 90875dcfc93e79d23f5ac4ebf0d212aca96d8fe1 (patch) | |
tree | 54078aec6af89422eefa583faf46e23e452f5712 | |
parent | 2ae5d113a29a2aa883f5597bf575dcd6c82141bc (diff) | |
download | libgsystem-90875dcfc93e79d23f5ac4ebf0d212aca96d8fe1.tar.gz |
shutil: Fall back to a copy if link() returns EPERM too
There are a few reasons we could get EPERM such as
/proc/sys/fs/protected_hardlinks being enabled.
This was showing up using rpm-ostree with Bodhi; we haven't fully
debugged it, but suspect this patch will fix it.
-rw-r--r-- | src/gsystem-shutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsystem-shutil.c b/src/gsystem-shutil.c index e8e6ca3..27564dc 100644 --- a/src/gsystem-shutil.c +++ b/src/gsystem-shutil.c @@ -182,7 +182,7 @@ cp_internal (GFile *src, { if (link (gs_file_get_path_cached (src_child), gs_file_get_path_cached (dest_child)) == -1) { - if (!(errno == EMLINK || errno == EXDEV)) + if (!(errno == EMLINK || errno == EXDEV || errno == EPERM)) { gs_set_error_from_errno (error, errno); goto out; |