We now call set_stat_xattr() before set_xattr().
authorWayne Davison <wayned@samba.org>
Sun, 25 Nov 2007 21:49:41 +0000 (13:49 -0800)
committerWayne Davison <wayned@samba.org>
Sun, 25 Nov 2007 21:49:41 +0000 (13:49 -0800)
rsync.c

diff --git a/rsync.c b/rsync.c
index ca12256..47b0ca1 100644 (file)
--- a/rsync.c
+++ b/rsync.c
@@ -380,10 +380,10 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
 #endif
 
 #ifdef SUPPORT_XATTRS
-       if (preserve_xattrs && fnamecmp)
-               set_xattr(fname, file, fnamecmp, sxp);
        if (am_root < 0)
                set_stat_xattr(fname, file, new_mode);
+       if (preserve_xattrs && fnamecmp)
+               set_xattr(fname, file, fnamecmp, sxp);
 #endif
 
        if (!preserve_times || (S_ISDIR(sxp->st.st_mode) && preserve_times == 1))