static void send_directory(int f, struct file_list *flist, int ndx,
char *fbuf, int len, int flags);
static void send_directory(int f, struct file_list *flist, int ndx,
char *fbuf, int len, int flags);
-static const char *flist_dir, *orig_dir;
-static int flist_dir_len;
+static const char *pathname, *orig_dir;
+static int pathname_len;
rsyserr(FERROR, errno, "pop_dir %s failed",
full_fname(orig_dir));
exit_cleanup(RERR_FILESELECT);
rsyserr(FERROR, errno, "pop_dir %s failed",
full_fname(orig_dir));
exit_cleanup(RERR_FILESELECT);
if (always_checksum && am_sender && S_ISREG(st.st_mode))
file_checksum(thisname, tmp_sum, st.st_size);
if (always_checksum && am_sender && S_ISREG(st.st_mode))
file_checksum(thisname, tmp_sum, st.st_size);
/* This code is only used by the receiver when it is building
* a list of files for a delete pass. */
/* This code is only used by the receiver when it is building
* a list of files for a delete pass. */
- if (F_ROOTDIR(file) != flist_dir) {
- if (!push_flist_dir(F_ROOTDIR(file), -1))
+ if (F_PATHNAME(file) != pathname) {
+ if (!push_pathname(F_PATHNAME(file), -1))
write_ndx(f, NDX_FLIST_OFFSET - send_dir_ndx);
change_local_filter_dir(fbuf, dlen, send_dir_depth);
write_ndx(f, NDX_FLIST_OFFSET - send_dir_ndx);
change_local_filter_dir(fbuf, dlen, send_dir_depth);
- send_directory(f, flist, send_dir_ndx, fbuf, dlen, FLAG_DIVERT_DIRS | FLAG_XFER_DIR);
+ send_directory(f, flist, send_dir_ndx, fbuf, dlen,
+ FLAG_DIVERT_DIRS | FLAG_XFER_DIR);
dirlen = dir ? strlen(dir) : 0;
if (dirlen != lastdir_len || memcmp(lastdir, dir, dirlen) != 0) {
dirlen = dir ? strlen(dir) : 0;
if (dirlen != lastdir_len || memcmp(lastdir, dir, dirlen) != 0) {
- lastdir = flist_dir;
- lastdir_len = flist_dir_len;
- } else if (!push_flist_dir(lastdir, lastdir_len)) {
+ lastdir = pathname;
+ lastdir_len = pathname_len;
+ } else if (!push_pathname(lastdir, lastdir_len)) {
push_error:
io_error |= IOERR_GENERAL;
rsyserr(FERROR, errno, "push_dir %s failed in %s",
push_error:
io_error |= IOERR_GENERAL;
rsyserr(FERROR, errno, "push_dir %s failed in %s",
file = send_file_name(f, flist, fbuf, &st,
top_flags, ALL_FILTERS);
if (file && !inc_recurse)
file = send_file_name(f, flist, fbuf, &st,
top_flags, ALL_FILTERS);
if (file && !inc_recurse)
if (!am_sender)
snprintf(depthbuf, sizeof depthbuf, "%d", F_DEPTH(file));
if (F_IS_ACTIVE(file)) {
if (!am_sender)
snprintf(depthbuf, sizeof depthbuf, "%d", F_DEPTH(file));
if (F_IS_ACTIVE(file)) {