summaryrefslogtreecommitdiff
path: root/syscall.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-01-25 16:51:10 -0800
committerWayne Davison <wayned@samba.org>2008-01-25 16:57:02 -0800
commite35ad79b1bb0239b50d08f80853acaf11dc13fac (patch)
treea6e1e2b07a19917aa7c21017205e11fdabaf0720 /syscall.c
parentda01d2e84320680b1cf7502c2af9b426325a64fa (diff)
downloadrsync-e35ad79b1bb0239b50d08f80853acaf11dc13fac.tar.gz
Make do_chmod() report an error with -E.
Diffstat (limited to 'syscall.c')
-rw-r--r--syscall.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/syscall.c b/syscall.c
index 4369c6e3..39554e95 100644
--- a/syscall.c
+++ b/syscall.c
@@ -34,6 +34,7 @@ extern int am_root;
extern int read_only;
extern int list_only;
extern int preserve_perms;
+extern int preserve_executability;
#define RETURN_ERROR_IF(x,e) \
do { \
@@ -167,7 +168,7 @@ int do_chmod(const char *path, mode_t mode)
#endif
} else
code = chmod(path, mode & CHMOD_BITS);
- if (code != 0 && preserve_perms)
+ if (code != 0 && (preserve_perms || preserve_executability))
return code;
return 0;
}