In delete_files(), handle new DEL_NO_RECURSE flag (and use
authorWayne Davison <wayned@samba.org>
Tue, 25 Jan 2005 12:07:13 +0000 (12:07 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 25 Jan 2005 12:07:13 +0000 (12:07 +0000)
renamed DEL_FORCE_RECURSE flag.

rsync.c

diff --git a/rsync.c b/rsync.c
index 576ce63..1ddb54f 100644 (file)
--- a/rsync.c
+++ b/rsync.c
@@ -76,7 +76,8 @@ int delete_file(char *fname, int flags)
                return -1;
        }
 
-       zap_dir = flags & DEL_RECURSE || (force_delete && recurse);
+       zap_dir = (flags & DEL_FORCE_RECURSE || (force_delete && recurse))
+               && !(flags & DEL_NO_RECURSE);
        if (dry_run && zap_dir)
                errno = ENOTEMPTY;
        else if (do_rmdir(fname) == 0) {