]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Fix unwritable directory issue due to misordered chmod call.
authorWayne Davison <wayned@samba.org>
Mon, 30 May 2011 15:24:27 +0000 (08:24 -0700)
committerWayne Davison <wayned@samba.org>
Mon, 30 May 2011 15:41:02 +0000 (08:41 -0700)
generator.c

index 4f74597e63c76eaa1e52df2c226bbdabb00a1929..88a762aacd14729194d139da472d1169e06055dd 100644 (file)
@@ -1523,6 +1523,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        }
                }
 
+#ifdef SUPPORT_XATTRS
+               if (preserve_xattrs && statret == 1)
+                       copy_xattrs(fnamecmpbuf, fname);
+#endif
+               if (set_file_attrs(fname, file, real_ret ? NULL : &real_sx, NULL, 0)
+                   && verbose && code != FNONE && f_out != -1)
+                       rprintf(code, "%s/\n", fname);
+
                /* We need to ensure that the dirs in the transfer have writable
                 * permissions during the time we are putting files within them.
                 * This is then fixed after the transfer is done. */
@@ -1538,14 +1546,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                }
 #endif
 
-#ifdef SUPPORT_XATTRS
-               if (preserve_xattrs && statret == 1)
-                       copy_xattrs(fnamecmpbuf, fname);
-#endif
-               if (set_file_attrs(fname, file, real_ret ? NULL : &real_sx, NULL, 0)
-                   && verbose && code != FNONE && f_out != -1)
-                       rprintf(code, "%s/\n", fname);
-
                if (real_ret != 0 && one_file_system)
                        real_sx.st.st_dev = filesystem_dev;
                if (inc_recurse) {