X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/08b7c3ed832fec774257a75152a697cd0a4b7447..fc4a695cddfc1b7705f1e1e3ea13108777b3a76a:/rsync.c diff --git a/rsync.c b/rsync.c index 845517d6..2c026a2d 100644 --- a/rsync.c +++ b/rsync.c @@ -3,7 +3,7 @@ * * 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 @@ -395,12 +395,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, 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 @@ -566,9 +561,10 @@ int finish_transfer(const char *fname, const char *fnametmp, } 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); }