*
* Copyright (C) 1996 Andrew Tridgell
* Copyright (C) 1996 Paul Mackerras
- * Copyright (C) 2003-2008 Wayne Davison
+ * Copyright (C) 2003-2009 Wayne Davison
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
extern int inc_recurse;
extern int inplace;
extern int flist_eof;
+extern int file_old_total;
extern int msgs2stderr;
extern int keep_dirlinks;
extern int make_backups;
goto read_loop;
}
- cur_flist = flist_for_ndx(ndx, "read_ndx_and_attrs");
+ flist = flist_for_ndx(ndx, "read_ndx_and_attrs");
+ if (flist != cur_flist) {
+ cur_flist = flist;
+ if (am_sender) {
+ file_old_total = cur_flist->used;
+ for (flist = first_flist; flist != cur_flist; flist = flist->next)
+ file_old_total += flist->used;
+ }
+ }
if (iflags & ITEM_BASIS_TYPE_FOLLOWS)
fnamecmp_type = read_byte(f_in);
full_fname(fname));
return 0;
}
-#ifdef SUPPORT_ACLS
- sx2.acc_acl = sx2.def_acl = NULL;
-#endif
-#ifdef SUPPORT_XATTRS
- sx2.xattr = NULL;
-#endif
+ init_stat_x(&sx2);
sxp = &sx2;
inherit = !preserve_perms;
} else
}
if (make_backups > 0 && overwriting_basis) {
- if (!make_backup(fname))
+ int ok = make_backup(fname, False);
+ if (!ok)
return 1;
- if (fnamecmp == fname)
+ if (ok == 1 && fnamecmp == fname)
fnamecmp = get_backup_name(fname);
}