If a server is refusing --delete, it should refuse
authorWayne Davison <wayned@samba.org>
Mon, 14 Feb 2005 17:50:30 +0000 (17:50 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 14 Feb 2005 17:50:30 +0000 (17:50 +0000)
--delete-sent-files also.

remove-sent-files.diff

index 5964ad8..baf1eab 100644 (file)
@@ -88,7 +88,7 @@ command before "make":
                list_only |= 1;
  
 --- orig/options.c     2005-02-14 02:45:10
-+++ options.c  2005-01-23 07:30:51
++++ options.c  2005-02-14 17:48:01
 @@ -59,6 +59,7 @@ int delete_during = 0;
  int delete_before = 0;
  int delete_after = 0;
@@ -121,17 +121,22 @@ command before "make":
    {"force",            0,  POPT_ARG_NONE,   &force_delete, 0, 0, 0 },
    {"numeric-ids",      0,  POPT_ARG_NONE,   &numeric_ids, 0, 0, 0 },
    {"filter",          'f', POPT_ARG_STRING, 0, OPT_FILTER, 0, 0 },
-@@ -958,6 +962,9 @@ int parse_arguments(int *argc, const cha
+@@ -958,6 +962,14 @@ int parse_arguments(int *argc, const cha
                return 0;
        }
  
-+      if (delete_sent_files)
++      if (delete_sent_files) {
++              if (refused_delete) {
++                      create_refuse_error(refused_delete);
++                      return 0;
++              }
 +              need_messages_from_generator = 1;
++      }
 +
        *argv = poptGetArgs(pc);
        *argc = count_args(*argv);
  
-@@ -1388,6 +1395,9 @@ void server_options(char **args,int *arg
+@@ -1388,6 +1400,9 @@ void server_options(char **args,int *arg
        if (fuzzy_basis && am_sender)
                args[ac++] = "--fuzzy";
  
@@ -186,7 +191,7 @@ command before "make":
                        }
                }
        }
---- orig/rsync.h       2005-02-14 02:45:10
+--- orig/rsync.h       2005-02-14 17:47:09
 +++ rsync.h    2005-02-03 02:04:59
 @@ -62,6 +62,7 @@
  #define FLAG_MOUNT_POINT (1<<2)       /* sender only */