Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only ignore ENOSYS error from lutimes().
[rsync/rsync.git]
/
rsync.c
diff --git
a/rsync.c
b/rsync.c
index
ca12256
..
1654c30
100644
(file)
--- a/
rsync.c
+++ b/
rsync.c
@@
-264,12
+264,13
@@
int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
}
if (!(flist = flist_for_ndx(ndx))) {
}
if (!(flist = flist_for_ndx(ndx))) {
+ int start, used;
invalid_ndx:
invalid_ndx:
+ start = first_flist ? first_flist->ndx_start : 0;
+ used = first_flist ? first_flist->used : 0;
rprintf(FERROR,
"Invalid file index: %d (%d - %d) with iflags %x [%s]\n",
rprintf(FERROR,
"Invalid file index: %d (%d - %d) with iflags %x [%s]\n",
- ndx, first_flist ? first_flist->ndx_start - 1 : -1,
- first_flist ? first_flist->prev->ndx_end : -1,
- iflags, who_am_i());
+ ndx, start - 1, start + used -1, iflags, who_am_i());
exit_cleanup(RERR_PROTOCOL);
}
cur_flist = flist;
exit_cleanup(RERR_PROTOCOL);
}
cur_flist = flist;
@@
-380,10
+381,10
@@
int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
#endif
#ifdef SUPPORT_XATTRS
#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 (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))
#endif
if (!preserve_times || (S_ISDIR(sxp->st.st_mode) && preserve_times == 1))
@@
-572,7
+573,7
@@
struct file_list *flist_for_ndx(int ndx)
return NULL;
flist = flist->prev;
}
return NULL;
flist = flist->prev;
}
- while (ndx >
flist->ndx_en
d) {
+ while (ndx >
= flist->ndx_start + flist->use
d) {
if (!(flist = flist->next))
return NULL;
}
if (!(flist = flist->next))
return NULL;
}