- Added set_io_timeout(), which sets all the timeout-dependent
[rsync/rsync.git] / generator.c
index 3a7dda3..e46da84 100644 (file)
@@ -186,7 +186,7 @@ static int delete_item(char *fname, int mode, int flags)
        if (do_rmdir(fname) == 0) {
                if (!(flags & DEL_TERSE))
                        log_delete(fname, mode);
-       } else if (errno != ENOTEMPTY && errno != ENOENT) {
+       } else if (errno != ENOTEMPTY && errno != EEXIST && errno != ENOENT) {
                rsyserr(FERROR, errno, "delete_file: rmdir %s failed",
                        full_fname(fname));
                return -1;
@@ -282,7 +282,8 @@ static void do_delete_pass(struct file_list *flist)
        char fbuf[MAXPATHLEN];
        int j;
 
-       if (dry_run > 1) /* destination doesn't exist yet */
+       if (dry_run > 1 /* destination doesn't exist yet */
+        || list_only)
                return;
 
        for (j = 0; j < flist->count; j++) {