std.posix: Handle USER_MAPPED_FILE in windows ftruncate() impl

This commit is contained in:
Linus Groh
2025-02-23 01:04:25 +00:00
committed by Andrew Kelley
parent e47f340e23
commit 68bd82d0cc

View File

@@ -1056,6 +1056,7 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {
.SUCCESS => return, .SUCCESS => return,
.INVALID_HANDLE => unreachable, // Handle not open for writing .INVALID_HANDLE => unreachable, // Handle not open for writing
.ACCESS_DENIED => return error.AccessDenied, .ACCESS_DENIED => return error.AccessDenied,
.USER_MAPPED_FILE => return error.AccessDenied,
else => return windows.unexpectedStatus(rc), else => return windows.unexpectedStatus(rc),
} }
} }