mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
ITS#8975 WIN32: Skip setting file pointer for write maps
CreateFileMapping already takes care of it.
This commit is contained in:
parent
8c39ba1077
commit
ea30be6109
1 changed files with 2 additions and 2 deletions
|
|
@ -3991,9 +3991,9 @@ mdb_env_map(MDB_env *env, void *addr)
|
|||
* and won't map more than the file size.
|
||||
* Just set the maxsize right now.
|
||||
*/
|
||||
if (SetFilePointer(env->me_fd, sizelo, &sizehi, 0) != (DWORD)sizelo
|
||||
if (!(flags & MDB_WRITEMAP) && (SetFilePointer(env->me_fd, sizelo, &sizehi, 0) != (DWORD)sizelo
|
||||
|| !SetEndOfFile(env->me_fd)
|
||||
|| SetFilePointer(env->me_fd, 0, NULL, 0) != 0)
|
||||
|| SetFilePointer(env->me_fd, 0, NULL, 0) != 0))
|
||||
return ErrCode();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue