extern int preserve_hard_links;
extern int preserve_perms;
extern int preserve_times;
-extern int omit_dir_times;
extern int uid_ndx;
extern int gid_ndx;
extern int delete_mode;
{
if (statret >= 0) { /* A from-dest-dir statret can == 1! */
int keep_time = !preserve_times ? 0
- : S_ISDIR(file->mode) ? !omit_dir_times
+ : S_ISDIR(file->mode) ? preserve_times > 1
: !S_ISLNK(file->mode);
if (S_ISREG(file->mode) && F_LENGTH(file) != sxp->st.st_size)
goto cleanup;
}
- if (append_mode > 0 && sx.st.st_size > F_LENGTH(file))
+ if (append_mode > 0 && sx.st.st_size >= F_LENGTH(file))
goto cleanup;
if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
* transfer and/or re-set any tweaked modified-time values. */
for (i = start; i <= end; i++, counter++) {
file = flist->files[i];
+ if (!S_ISDIR(file->mode))
+ continue;
if (verbose > 3) {
fname = f_name(file, NULL);
rprintf(FINFO, "touch_up_dirs: %s (%d)\n",
NS(fname), i);
}
- if (!F_IS_ACTIVE(file) || !S_ISDIR(file->mode)
- || file->flags & FLAG_MISSING_DIR)
- continue;
- if (!need_retouch_dir_times && file->mode & S_IWUSR)
+ if (!F_IS_ACTIVE(file) || file->flags & FLAG_MISSING_DIR
+ || (!need_retouch_dir_times && file->mode & S_IWUSR))
continue;
fname = f_name(file, NULL);
if (!(file->mode & S_IWUSR))
}
solo_file = local_name;
dir_tweaking = !(list_only || solo_file || dry_run);
- need_retouch_dir_times = preserve_times && !omit_dir_times;
+ need_retouch_dir_times = preserve_times > 1;
lull_mod = allowed_lull * 5;
if (verbose > 2)