The delete-during code needs to skip directories that don't exist
authorWayne Davison <wayned@samba.org>
Sat, 14 Jul 2007 04:20:13 +0000 (04:20 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 14 Jul 2007 04:20:13 +0000 (04:20 +0000)
yet in --dry-run mode to avoid outputting bogus delete details.

generator.c

index 1064ff5..b3a31f0 100644 (file)
@@ -1909,7 +1909,7 @@ void generate_files(int f_out, const char *local_name)
                        f_name(fp, fbuf);
                        ndx = cur_flist->ndx_start - 1;
                        recv_generator(fbuf, fp, ndx, itemizing, code, f_out);
                        f_name(fp, fbuf);
                        ndx = cur_flist->ndx_start - 1;
                        recv_generator(fbuf, fp, ndx, itemizing, code, f_out);
-                       if (delete_during) {
+                       if (delete_during && dry_run < 2) {
                                if (BITS_SETnUNSET(fp->flags, FLAG_XFER_DIR, FLAG_MISSING_DIR)) {
                                        dev_t dirdev;
                                        if (one_file_system) {
                                if (BITS_SETnUNSET(fp->flags, FLAG_XFER_DIR, FLAG_MISSING_DIR)) {
                                        dev_t dirdev;
                                        if (one_file_system) {