Updated to apply cleanly.
[rsync-patches.git] / backup-dir-dels.diff
index fa68ad586cd6179a6f8bdab97464b27b50d8dabf..d8511029db59385926617fabd74cda80d8bdff7d 100644 (file)
@@ -19,7 +19,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                 (optional if already run)
     make
 
-based-on: 3bd9f51917ed5718275c6132006be155239a0550
+based-on: 28b519c93b6db30b6520d46f8cd65160213fddd2
 diff --git a/backup.c b/backup.c
 --- a/backup.c
 +++ b/backup.c
@@ -197,7 +197,7 @@ diff --git a/delete.c b/delete.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -151,10 +151,14 @@ int no_detach
+@@ -152,10 +152,14 @@ int no_detach
  int write_batch = 0;
  int read_batch = 0;
  int backup_dir_len = 0;
@@ -212,7 +212,7 @@ diff --git a/options.c b/options.c
  char *tmpdir = NULL;
  char *partial_dir = NULL;
  char *basis_dir[MAX_BASIS_DIRS+1];
-@@ -166,7 +170,9 @@ char *stdout_format = NULL;
+@@ -167,7 +171,9 @@ char *stdout_format = NULL;
  char *password_file = NULL;
  char *rsync_path = RSYNC_PATH;
  char *backup_dir = NULL;
@@ -222,7 +222,7 @@ diff --git a/options.c b/options.c
  char *sockopts = NULL;
  char *usermap = NULL;
  char *groupmap = NULL;
-@@ -671,6 +677,8 @@ void usage(enum logcode F)
+@@ -676,6 +682,8 @@ void usage(enum logcode F)
    rprintf(F," -b, --backup                make backups (see --suffix & --backup-dir)\n");
    rprintf(F,"     --backup-dir=DIR        make backups into hierarchy based in DIR\n");
    rprintf(F,"     --suffix=SUFFIX         set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
@@ -231,7 +231,7 @@ diff --git a/options.c b/options.c
    rprintf(F," -u, --update                skip files that are newer on the receiver\n");
    rprintf(F,"     --inplace               update destination files in-place (SEE MAN PAGE)\n");
    rprintf(F,"     --append                append data onto shorter files\n");
-@@ -974,7 +982,9 @@ static struct poptOption long_options[] = {
+@@ -985,7 +993,9 @@ static struct poptOption long_options[] = {
    {"backup",          'b', POPT_ARG_VAL,    &make_backups, 1, 0, 0 },
    {"no-backup",        0,  POPT_ARG_VAL,    &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
@@ -241,7 +241,7 @@ diff --git a/options.c b/options.c
    {"list-only",        0,  POPT_ARG_VAL,    &list_only, 2, 0, 0 },
    {"read-batch",       0,  POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
    {"write-batch",      0,  POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -2011,6 +2021,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2022,6 +2032,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
@@ -250,7 +250,7 @@ diff --git a/options.c b/options.c
        }
        if (daemon_filter_list.head && !am_sender) {
                filter_rule_list *elp = &daemon_filter_list;
-@@ -2032,6 +2044,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2043,6 +2055,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        if (check_filter(elp, FLOG, dir, 1) < 0)
                                goto options_rejected;
                }
@@ -265,7 +265,7 @@ diff --git a/options.c b/options.c
        }
  
        if (!backup_suffix)
-@@ -2043,6 +2063,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2054,6 +2074,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        backup_suffix);
                return 0;
        }
@@ -286,7 +286,7 @@ diff --git a/options.c b/options.c
        if (backup_dir) {
                size_t len;
                while (*backup_dir == '.' && backup_dir[1] == '/')
-@@ -2078,6 +2112,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2089,6 +2123,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        "P *%s", backup_suffix);
                parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
        }
@@ -321,7 +321,7 @@ diff --git a/options.c b/options.c
  
        if (preserve_times) {
                preserve_times = PRESERVE_FILE_TIMES;
-@@ -2499,6 +2561,10 @@ void server_options(char **args, int *argc_p)
+@@ -2510,6 +2572,10 @@ void server_options(char **args, int *argc_p)
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
        }
@@ -332,7 +332,7 @@ diff --git a/options.c b/options.c
  
        /* Only send --suffix if it specifies a non-default value. */
        if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -2507,7 +2573,14 @@ void server_options(char **args, int *argc_p)
+@@ -2518,7 +2584,14 @@ void server_options(char **args, int *argc_p)
                        goto oom;
                args[ac++] = arg;
        }