mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-05 13:40:08 +08:00
ITS#5774 blind fix for Windows, please test
This commit is contained in:
parent
93c75ea669
commit
66be548b58
@ -336,7 +336,13 @@ spew_entry( Entry * e, struct berval * path, int dolock, int *save_errnop )
|
|||||||
tmpfname, STRERROR( save_errno ), 0 );
|
tmpfname, STRERROR( save_errno ), 0 );
|
||||||
|
|
||||||
} else {
|
} 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 );
|
res = rename( tmpfname, path->bv_val );
|
||||||
|
#endif
|
||||||
if ( res == 0 ) {
|
if ( res == 0 ) {
|
||||||
rs = LDAP_SUCCESS;
|
rs = LDAP_SUCCESS;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user