rsyserr(FERROR, errno, "delete_file: rmdir %s failed",
full_fname(fname));
return -1;
rsyserr(FERROR, errno, "delete_file: rmdir %s failed",
full_fname(fname));
return -1;
* from the filesystem. */
for (i = dirlist->count; i--; ) {
struct file_struct *fp = dirlist->files[i];
* from the filesystem. */
for (i = dirlist->count; i--; ) {
struct file_struct *fp = dirlist->files[i];
- if ((iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !keep_time)
- || (keep_time && file->modtime != st->st_mtime))
+ if ((iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !keep_time
+ && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
+ || (keep_time && cmp_modtime(file->modtime, st->st_mtime) != 0))
iflags |= ITEM_REPORT_PERMS;
if (preserve_uid && am_root && file->uid != st->st_uid)
iflags |= ITEM_REPORT_OWNER;
iflags |= ITEM_REPORT_PERMS;
if (preserve_uid && am_root && file->uid != st->st_uid)
iflags |= ITEM_REPORT_OWNER;
itemize(file, ndx, statret, &st,
statret ? ITEM_LOCAL_CHANGE : 0, 0, NULL);
}
itemize(file, ndx, statret, &st,
statret ? ITEM_LOCAL_CHANGE : 0, 0, NULL);
}
if (!relative_paths || errno != ENOENT
|| create_directory_path(fname, orig_umask) < 0
if (!relative_paths || errno != ENOENT
|| create_directory_path(fname, orig_umask) < 0
rsyserr(FERROR, errno, "mknod %s failed",
full_fname(fname));
} else {
rsyserr(FERROR, errno, "mknod %s failed",
full_fname(fname));
} else {
int need_retouch_dir_times = preserve_times && !omit_dir_times;
int need_retouch_dir_perms = 0;
int save_only_existing = only_existing;
int need_retouch_dir_times = preserve_times && !omit_dir_times;
int need_retouch_dir_perms = 0;
int save_only_existing = only_existing;
/* We need to ensure that any dirs we create have writeable
* permissions during the time we are putting files within
* them. This is then fixed after the transfer is done. */
/* We need to ensure that any dirs we create have writeable
* permissions during the time we are putting files within
* them. This is then fixed after the transfer is done. */
if (!am_root && S_ISDIR(file->mode) && !(file->mode & S_IWUSR)
&& !list_only) {
int mode = file->mode | S_IWUSR; /* user write */
char *fname = local_name ? local_name : fbuf;
if (!am_root && S_ISDIR(file->mode) && !(file->mode & S_IWUSR)
&& !list_only) {
int mode = file->mode | S_IWUSR; /* user write */
char *fname = local_name ? local_name : fbuf;
rsyserr(FERROR, errno,
"failed to modify permissions on %s",
full_fname(fname));
}
need_retouch_dir_perms = 1;
}
rsyserr(FERROR, errno,
"failed to modify permissions on %s",
full_fname(fname));
}
need_retouch_dir_perms = 1;
}