mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 08:18:30 +00:00
Fix SQLite regressions caused by 3b086af91
This commit is contained in:
parent
bdc453b22d
commit
3851025b77
7 changed files with 25 additions and 12 deletions
|
@ -32,8 +32,10 @@ textwindows int sys_truncate_nt(const char *path, uint64_t length) {
|
|||
uint16_t path16[PATH_MAX];
|
||||
if (__mkntpath(path, path16) == -1) return -1;
|
||||
BLOCK_SIGNALS;
|
||||
if ((fh = CreateFile(path16, kNtGenericWrite, kNtFileShareRead, NULL,
|
||||
kNtOpenExisting, kNtFileAttributeNormal, 0)) != -1) {
|
||||
if ((fh = CreateFile(
|
||||
path16, kNtGenericWrite,
|
||||
kNtFileShareRead | kNtFileShareWrite | kNtFileShareDelete, NULL,
|
||||
kNtOpenExisting, kNtFileAttributeNormal, 0)) != -1) {
|
||||
rc = sys_ftruncate_nt(fh, length);
|
||||
CloseHandle(fh);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue