X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/6cbde57d8810d9889b650c49456fa843f76257c7..a9e4762634885ace5dfb50bc1bc69094b82c766b:/generator.c diff --git a/generator.c b/generator.c index a4b9b0da..8e731e28 100644 --- a/generator.c +++ b/generator.c @@ -261,7 +261,7 @@ static void delete_in_dir(struct file_list *flist, char *fbuf, dlen = strlen(fbuf); filt_array[cur_depth] = push_local_filters(fbuf, dlen); - if (link_stat(fbuf, &st, keep_dirlinks) < 0) + if (link_stat(fbuf, &st, keep_dirlinks) < 0 || !S_ISDIR(st.st_mode)) return; if (one_file_system) { @@ -360,7 +360,7 @@ void itemize(struct file_struct *file, int ndx, int statret, STRUCT_STAT *st, iflags &= 0xffff; if ((iflags & SIGNIFICANT_ITEM_FLAGS || verbose > 1 - || (xname && *xname)) && !read_batch) { + || log_format_has_i > 1 || (xname && *xname)) && !read_batch) { if (protocol_version >= 29) { if (ndx >= 0) write_int(sock_f_out, ndx); @@ -1195,7 +1195,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, close(fd); return; } - if (!(back_file = make_file(fname, NULL, NO_FILTERS))) { + if (!(back_file = make_file(fname, NULL, NULL, NO_FILTERS))) { close(fd); goto pretend_missing; } @@ -1267,7 +1267,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, close(fd); } - void generate_files(int f_out, struct file_list *flist, char *local_name) { int i; @@ -1430,6 +1429,7 @@ void generate_files(int f_out, struct file_list *flist, char *local_name) * modified-time values. */ for (i = 0; i < flist->count; i++) { struct file_struct *file = flist->files[i]; + if (!file->basename || !S_ISDIR(file->mode)) continue; if (!need_retouch_dir_times && file->mode & S_IWUSR)