Fix SQLite regressions caused by 3b086af91

This commit is contained in:
Justine Tunney 2023-10-13 10:48:04 -07:00
parent bdc453b22d
commit 3851025b77
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
7 changed files with 25 additions and 12 deletions

View file

@ -36,6 +36,7 @@
#include "libc/nt/enum/accessmask.h"
#include "libc/nt/enum/creationdisposition.h"
#include "libc/nt/enum/fileflagandattributes.h"
#include "libc/nt/enum/filesharemode.h"
#include "libc/nt/enum/filetype.h"
#include "libc/nt/files.h"
#include "libc/nt/runtime.h"
@ -229,10 +230,13 @@ TryAgain:
// get inode such that it's consistent with stat()
// it's important that we not follow symlinks here
int64_t fh = CreateFile(jp, kNtFileReadAttributes, 0, 0, kNtOpenExisting,
kNtFileAttributeNormal | kNtFileFlagBackupSemantics |
kNtFileFlagOpenReparsePoint,
0);
int64_t fh =
CreateFile(jp, kNtFileReadAttributes,
kNtFileShareRead | kNtFileShareWrite | kNtFileShareDelete, 0,
kNtOpenExisting,
kNtFileAttributeNormal | kNtFileFlagBackupSemantics |
kNtFileFlagOpenReparsePoint,
0);
if (fh != kNtInvalidHandleValue) {
struct NtByHandleFileInformation wst;
if (GetFileInformationByHandle(fh, &wst)) {