summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/copy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/copy.c b/src/copy.c
index a764d8990..1a762df85 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -25,8 +25,9 @@
#define DO_CHOWN(Chown, File, New_uid, New_gid) \
(Chown ((File), (x->myeuid == 0 ? (New_uid) : x->myeuid), (New_gid)) \
/* If non-root uses -p, it's ok if we can't preserve ownership. \
- But root probably wants to know, e.g. if NFS disallows it. */ \
- && (errno != EPERM || x->myeuid == 0))
+ But root probably wants to know, e.g. if NFS disallows it, \
+ or if the target system doesn't support file ownership. */ \
+ && ((errno != EPERM && errno != EINVAL) || x->myeuid == 0))
struct dir_list
{