X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/ee1d11c495d0083afdad1725860bec7011e8377d..ed7e79553edc2e65348019854b0fe52b73427daa:/generator.c diff --git a/generator.c b/generator.c index f645bf75..62100f51 100644 --- a/generator.c +++ b/generator.c @@ -336,6 +336,9 @@ void itemize(struct file_struct *file, int ndx, int statret, STRUCT_STAT *st, if (protocol_version >= 29) { if (ndx >= 0) write_int(sock_f_out, ndx); + /* XXX Temorary compatibility hack */ + if (iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE)) + iflags |= ITEM_REPORT_XATTRS; /* ITEM_UPDATE */ write_shortint(sock_f_out, iflags); if (hlink) write_vstring(sock_f_out, hlink, strlen(hlink)); @@ -380,7 +383,7 @@ static int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st) * The block size is a rounded square root of file length. * * The checksum size is determined according to: - * blocksum_bits = BLOCKSUM_EXP + 2*log2(file_len) - log2(block_len) + * blocksum_bits = BLOCKSUM_BIAS + 2*log2(file_len) - log2(block_len) * provided by Donovan Baarda which gives a probability of rsync * algorithm corrupting data and falling back using the whole md4 * checksums. @@ -565,6 +568,8 @@ void check_for_finished_hlinks(int itemizing, enum logcode code) } } +static int phase = 0; + /* Acts on the_file_list->file's ndx'th item, whose name is fname. If a dir, * make sure it exists, and has the right permissions/timestamp info. For * all other non-regular files (symlinks, etc.) we create them here. For @@ -704,7 +709,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, if (set_perms(fname, file, statret ? NULL : &st, 0) && verbose && code && f_out != -1) rprintf(code, "%s/\n", safe_fname(fname)); - if (delete_during && f_out != -1 && csum_length != SUM_LENGTH + if (delete_during && f_out != -1 && !phase && (file->flags & FLAG_DEL_HERE)) delete_in_dir(the_file_list, fname, file); return; @@ -1088,7 +1093,6 @@ void generate_files(int f_out, struct file_list *flist, char *local_name, int f_out_name) { int i, lull_mod; - int phase = 0; char fbuf[MAXPATHLEN]; int itemizing, maybe_PERMS_REPORT; enum logcode code;