Make the auto-generated protect filters use the perishable flag so
[rsync/rsync.git] / options.c
index 0478749..b720565 100644 (file)
--- a/options.c
+++ b/options.c
@@ -3,12 +3,11 @@
  *
  * Copyright (C) 1998-2001 Andrew Tridgell <tridge@samba.org>
  * Copyright (C) 2000, 2001, 2002 Martin Pool <mbp@samba.org>
- * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Wayne Davison
+ * Copyright (C) 2002-2007 Wayne Davison
  *
  * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1290,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)
@@ -1406,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);