mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-04-29 02:25:45 -04:00
Make do_chmod() report an error with -E.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ int read_only = 0;
|
||||
int list_only = 0;
|
||||
int verbose = 0;
|
||||
int preserve_perms = 0;
|
||||
int preserve_executability = 0;
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
|
||||
1
tls.c
1
tls.c
@@ -46,6 +46,7 @@ int am_root = 0;
|
||||
int read_only = 1;
|
||||
int list_only = 0;
|
||||
int preserve_perms = 0;
|
||||
int preserve_executability = 0;
|
||||
|
||||
#ifdef SUPPORT_XATTRS
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ int am_root = 0;
|
||||
int read_only = 1;
|
||||
int list_only = 0;
|
||||
int preserve_perms = 0;
|
||||
int preserve_executability = 0;
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
|
||||
Reference in New Issue
Block a user