Make the auto-generated protect filters use the perishable flag so
authorWayne Davison <wayned@samba.org>
Fri, 2 Mar 2007 21:14:01 +0000 (21:14 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 2 Mar 2007 21:14:01 +0000 (21:14 +0000)
that they don't stop a vanished directory from being removed.

options.c

index e3e2624..b720565 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1289,7 +1289,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                return 0;
        } else if (make_backups && delete_mode && !delete_excluded) {
                snprintf(backup_dir_buf, sizeof backup_dir_buf,
-                       "P *%s", backup_suffix);
+                       "Pp *%s", backup_suffix);
                parse_rule(&filter_list, backup_dir_buf, 0, 0);
        }
        if (make_backups && !backup_dir)
@@ -1405,7 +1405,8 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                                partial_dir = NULL;
                        else if (*partial_dir != '/' && !am_server) {
                                parse_rule(&filter_list, partial_dir,
-                                   MATCHFLG_NO_PREFIXES|MATCHFLG_DIRECTORY, 0);
+                                   MATCHFLG_NO_PREFIXES | MATCHFLG_DIRECTORY
+                                   | MATCHFLG_PERISHABLE, 0);
                        }
                        if (!partial_dir && refused_partial) {
                                create_refuse_error(refused_partial);