Don't try to backup a file being removed from the backup area.
authorWayne Davison <wayned@samba.org>
Sat, 11 Apr 2009 06:14:06 +0000 (23:14 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 11 Apr 2009 06:14:06 +0000 (23:14 -0700)
delete.c

index 33fdd0e..fcdf86b 100644 (file)
--- a/delete.c
+++ b/delete.c
@@ -170,7 +170,7 @@ enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
                what = "rmdir";
                ok = do_rmdir(fbuf) == 0;
        } else {
-               if (make_backups > 0 && (backup_dir || !is_backup_file(fbuf))) {
+               if (make_backups > 0 && !(flags & DEL_FOR_BACKUP) && (backup_dir || !is_backup_file(fbuf))) {
                        what = "make_backup";
                        ok = make_backup(fbuf, True);
                        if (ok == 2) {