summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-09-29 07:41:50 +0000
committerWayne Davison <wayned@samba.org>2005-09-29 07:41:50 +0000
commit8d6c1c4e97ed8d2803f93cd7bb7a0cc53255048c (patch)
tree5a887297bd72a73ad0a6968f3e18e26a8b58f9d3
parent10a1a3f5114e03d3bcc259246ac51c0662158e0b (diff)
downloadrsync-8d6c1c4e97ed8d2803f93cd7bb7a0cc53255048c.tar.gz
rsync-8d6c1c4e97ed8d2803f93cd7bb7a0cc53255048c.tar.bz2
rsync-8d6c1c4e97ed8d2803f93cd7bb7a0cc53255048c.zip
Allow deletions to occur in directories transferred with the
--dirs option in addition to the regular --recursive behavior.
-rw-r--r--options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/options.c b/options.c
index 9bb01f85..dacc3b88 100644
--- a/options.c
+++ b/options.c
@@ -1005,7 +1005,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
if (files_from) {
if (recurse == 1) /* preserve recurse == 2 */
recurse = 0;
- if (xfer_dirs < 0)
+ if (xfer_dirs < 1)
xfer_dirs = 1;
}
@@ -1022,7 +1022,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
"You may not combine multiple --delete-WHEN options.\n");
return 0;
}
- if (!recurse) {
+ if (!xfer_dirs) {
delete_before = delete_during = delete_after = 0;
delete_mode = delete_excluded = 0;
} else if (delete_before || delete_during || delete_after)