fix(fs): set RealFs mtime with FILE_WRITE_ATTRIBUTES on Windows - #2391
Merged
Merged
Conversation
Read-only open made SetFileTime fail with ERROR_ACCESS_DENIED, breaking builtin touch on Windows. Open with FILE_WRITE_ATTRIBUTES inside the blocking worker; Unix path unchanged. Cover with realfs touch regression test and run it in the windows-containment CI job. Fixes #2388.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | f495a4e | Commit Preview URL Branch Preview URL |
Sep 10 2026, 08:04 PM |
3 tasks
chaliy
added a commit
that referenced
this pull request
Sep 11, 2026
## What changed Release preparation for v0.18.0: version bumped to 0.18.0 across Cargo workspace, JS/WASM packages, and doc examples; CHANGELOG entry with Highlights, Added, Fixed, Changed, and What's Changed for the 31 PRs since v0.17.1. Headliners: read-only filesystem mounts for host bindings (#2393) and host-directory mounts over the C ABI (#2371), plus targeted correctness fixes (awk lexer #2392, Windows RealFs mtime #2391, uutils drift #2385, sqlite budgeting #2369, SVG docs #2368, russh 0.63.1 #2365). ## Why Monthly minor release per release process. ## Before / After No runtime behavior change in this PR itself — version metadata + changelog only. `just release-check` running as the gate. ## Risk - Low: version strings and changelog prose only. ## Checklist - [x] Changelog entry added - [x] Version bumped (Cargo, JS/WASM, docs) - [ ] `just release-check` green
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2388.
What
Builtin
touchfailed on Windows withio error: Access denied (os error 5).RealFs::set_modified_timeopened the file read-only; WindowsSetFileTimerequires
FILE_WRITE_ATTRIBUTESon the handle (Unixfutimensignores thefd open mode, so only Windows broke). The open now happens inside the blocking
worker with
FILE_WRITE_ATTRIBUTESon Windows; the Unix path is unchanged.Proof
Before:
touch <file>on Windows ->os error 5(see issue).After:
realfs_touch_sets_mtime_issue_2388(touch viaBash::execon a RealFs mount, asserts exit 0 + mtime updated) passes.realfs_testssuite green (43 passed), clippy/fmt clean on Linux,cargo check+ clippy clean forx86_64-pc-windows-msvc.windows-containmentCI job now runs the touch test, so the fixedWindows code path is runtime-covered (previously only
windows_containmentfilters ran there).
Note:
just pre-prlocally shows one unrelated failure(
malformed_command_substitution_aborts_like_bash) caused by this sandbox'sbash 3.2 printing
abforecho 'a$(|)b'; main CI is green. Unrelated tothis diff (parser untouched).
Produced by yolop