mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Make sure init_meta is at beginning of file
This commit is contained in:
parent
ed86a086f7
commit
9acf801cc1
@ -2518,10 +2518,12 @@ mdb_env_init_meta(MDB_env *env, MDB_meta *meta)
|
||||
#ifdef _WIN32
|
||||
{
|
||||
DWORD len;
|
||||
SetFilePointer(env->me_fd, 0, NULL, FILE_BEGIN);
|
||||
rc = WriteFile(env->me_fd, p, psize * 2, &len, NULL);
|
||||
rc = (len == psize * 2) ? MDB_SUCCESS : ErrCode();
|
||||
}
|
||||
#else
|
||||
lseek(env->me_fd, 0, SEEK_SET);
|
||||
rc = write(env->me_fd, p, psize * 2);
|
||||
rc = (rc == (int)psize * 2) ? MDB_SUCCESS : ErrCode();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user