r23950: unlink before rename is superfluous.
authorMichael Adam <obnox@samba.org>
Wed, 18 Jul 2007 08:29:00 +0000 (08:29 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:28:48 +0000 (12:28 -0500)
Michael

source/lib/tdb/tools/tdbbackup.c

index a161085798d183eb59029da0c287ca63cddf6fa7..dedfb9e6656fc408a059ce3ea54cd0990626e6e6 100644 (file)
@@ -177,7 +177,6 @@ static int backup_tdb(const char *old_name, const char *new_name, int hash_size)
 
        /* close the new tdb and rename it to .bak */
        tdb_close(tdb_new);
-       unlink(new_name);
        if (rename(tmp_name, new_name) != 0) {
                perror(new_name);
                free(tmp_name);