Commit 9acf801c authored by Howard Chu's avatar Howard Chu
Browse files

Make sure init_meta is at beginning of file

parent ed86a086
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment