for (j = dirlist->used; j--; ) {
struct file_struct *fp = dirlist->files[j];
- if (fp->flags & FLAG_MOUNT_DIR) {
+ if (fp->flags & FLAG_MOUNT_DIR && S_ISDIR(fp->mode)) {
if (verbose > 1) {
rprintf(FINFO,
"mount point, %s, pins parent directory\n",
struct file_struct *fp = dirlist->files[i];
if (!F_IS_ACTIVE(fp))
continue;
- if (fp->flags & FLAG_MOUNT_DIR) {
+ if (fp->flags & FLAG_MOUNT_DIR && S_ISDIR(fp->mode)) {
if (verbose > 1)
rprintf(FINFO, "cannot delete mount point: %s\n",
f_name(fp, NULL));
&& !am_root && sx.st.st_uid == our_uid)
del_opts |= DEL_NO_UID_WRITE;
+ if (ignore_existing > 0 && statret == 0
+ && (!is_dir || !S_ISDIR(sx.st.st_mode))) {
+ if (verbose > 1 && is_dir >= 0)
+ rprintf(FINFO, "%s exists\n", fname);
+ goto cleanup;
+ }
+
if (is_dir) {
if (!implied_dirs && file->flags & FLAG_IMPLIED_DIR)
goto cleanup;
goto cleanup;
}
- if (ignore_existing > 0 && statret == 0) {
- if (verbose > 1)
- rprintf(FINFO, "%s exists\n", fname);
- goto cleanup;
- }
-
if (update_only > 0 && statret == 0
&& cmp_time(sx.st.st_mtime, file->modtime) > 0) {
if (verbose > 1)
goto cleanup;
}
- if (append_mode > 0 && sx.st.st_size >= F_LENGTH(file))
- goto cleanup;
-
if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
;
else if (fnamecmp_type == FNAMECMP_FUZZY)
goto cleanup;
}
+ if (append_mode > 0 && sx.st.st_size >= F_LENGTH(file)) {
+ goto cleanup;
+ }
+
prepare_to_open:
if (partialptr) {
sx.st = partial_st;
rprintf(FINFO, "generating and sending sums for %d\n", ndx);
notify_others:
- if (remove_source_files && !delay_updates && !phase)
+ if (remove_source_files && !delay_updates && !phase && !dry_run)
increment_active_files(ndx, itemizing, code);
if (inc_recurse && !dry_run)
cur_flist->in_progress++;