ITS#5774 blind fix for Windows, please test

This commit is contained in:
Howard Chu 2008-10-29 13:14:10 +00:00
parent 93c75ea669
commit 66be548b58

View File

@ -336,7 +336,13 @@ spew_entry( Entry * e, struct berval * path, int dolock, int *save_errnop )
tmpfname, STRERROR( save_errno ), 0 );
} else {
#ifdef _WIN32
/* returns 0 on failure, nonzero on success */
res = MoveFileEx( tmpfname, path->bv_val,
MOVEFILE_REPLACE_EXISTING ) == 0;
#else
res = rename( tmpfname, path->bv_val );
#endif
if ( res == 0 ) {
rs = LDAP_SUCCESS;