From: Michael Adam Date: Wed, 18 Jul 2007 08:29:00 +0000 (+0000) Subject: r23950: unlink before rename is superfluous. X-Git-Tag: samba-4.0.0alpha6~801^2~5310 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67b0553f56c3757d734e6041d6ac69ee8ddfad6d;p=thirdparty%2Fsamba.git r23950: unlink before rename is superfluous. Michael (This used to be commit 63c4c40cf7055ab7cf413a23e306cf209a1dd0a1) --- diff --git a/source3/lib/tdb/tools/tdbbackup.c b/source3/lib/tdb/tools/tdbbackup.c index a161085798d..dedfb9e6656 100644 --- a/source3/lib/tdb/tools/tdbbackup.c +++ b/source3/lib/tdb/tools/tdbbackup.c @@ -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);