Decided that we don't really want the rule that preserves the
authorWayne Davison <wayned@samba.org>
Mon, 5 Mar 2007 17:08:00 +0000 (17:08 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 5 Mar 2007 17:08:00 +0000 (17:08 +0000)
backup-suffix files to be perishable.

compat.c
options.c

index 714f1cb..62b2ba0 100644 (file)
--- a/compat.c
+++ b/compat.c
@@ -156,16 +156,6 @@ void setup_protocol(int f_out,int f_in)
                need_messages_from_generator = 1;
        }
 
-       if (make_backups && !backup_dir && delete_mode && !delete_excluded
-        && (!am_server || local_server)) {
-               char *rule;
-               if (asprintf(&rule, "P%s *%s",
-                           !am_sender || protocol_version >= 30 ? "p" : "",
-                           backup_suffix) < 0)
-                       out_of_memory("setup_protocol");
-               parse_rule(&filter_list, rule, 0, 0);
-               free(rule);
-       }
        if (partial_dir && *partial_dir != '/' && (!am_server || local_server)) {
                int flags = MATCHFLG_NO_PREFIXES | MATCHFLG_DIRECTORY;
                if (!am_sender || protocol_version >= 30)
index 4017f81..97e50b8 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1287,6 +1287,10 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                snprintf(err_buf, sizeof err_buf,
                        "--suffix cannot be a null string without --backup-dir\n");
                return 0;
+       } else if (make_backups && delete_mode && !delete_excluded && !am_server) {
+               snprintf(backup_dir_buf, sizeof backup_dir_buf,
+                       "P *%s", backup_suffix);
+               parse_rule(&filter_list, backup_dir_buf, 0, 0);
        }
        if (make_backups && !backup_dir)
                omit_dir_times = 1;