diff options
author | Wayne Davison <wayned@samba.org> | 2009-03-06 22:41:23 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2009-03-06 22:41:23 -0800 |
commit | 4e0fa131fe6a5d864bb6918ff32671484df132c9 (patch) | |
tree | 03f392038e8bccc7c9c963f8fac19370b1f6d704 /flist.c | |
parent | 17a1676976deacb11cbd064f3de0032c7a381069 (diff) | |
download | rsync-4e0fa131fe6a5d864bb6918ff32671484df132c9.tar.gz rsync-4e0fa131fe6a5d864bb6918ff32671484df132c9.tar.bz2 rsync-4e0fa131fe6a5d864bb6918ff32671484df132c9.zip |
Don't let --chmod tweak a 0 mode value (which marks a missing arg).
Diffstat (limited to 'flist.c')
-rw-r--r-- | flist.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -794,7 +794,7 @@ static struct file_struct *recv_file_entry(struct file_list *flist, if (!(xflags & XMIT_SAME_MODE)) mode = from_wire_mode(read_int(f)); - if (chmod_modes && !S_ISLNK(mode)) + if (chmod_modes && !S_ISLNK(mode) && mode) mode = tweak_mode(mode, chmod_modes); if (preserve_uid && !(xflags & XMIT_SAME_UID)) { @@ -1372,7 +1372,7 @@ static struct file_struct *send_file_name(int f, struct file_list *flist, if (!file) return NULL; - if (chmod_modes && !S_ISLNK(file->mode)) + if (chmod_modes && !S_ISLNK(file->mode) && file->mode) file->mode = tweak_mode(file->mode, chmod_modes); if (f >= 0) { |