]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.26] os: support deleting inaccessible files in RemoveAll
authorMichal Pristas <michal.pristas@gmail.com>
Wed, 4 Feb 2026 09:36:59 +0000 (09:36 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 18 Feb 2026 18:21:15 +0000 (10:21 -0800)
commitc283d1f762ea21472812eac2451d02eb8f354fac
tree6e0ac06f95dd54b15ce5f0ccf943209ae31035f9
parentd90b98e65320778f3b1f99a6951ab20f04d218b3
[release-branch.go1.26] os: support deleting inaccessible files in RemoveAll

windows: retry file open with DELETE access after access denied

Additional access rights when opening files, including SYNCHRONIZE,
break deletion when the caller has FILE_DELETE_CHILD on the parent
directory but not the file. Retry with DELETE only restores correct
Windows semantics.

For #77407

Change-Id: Ie53bc6f1673de1a8af4dcfb7496daf99e71098cb
GitHub-Last-Rev: 0ad635cf1a13c0242e3b1922cf47a8c594dd7215
GitHub-Pull-Request: golang/go#77403
Reviewed-on: https://go-review.googlesource.com/c/go/+/741040
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
(cherry picked from commit db5882ea9bf63849d554910f486c4c5cfea08852)
Reviewed-on: https://go-review.googlesource.com/c/go/+/746362
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
src/internal/syscall/windows/at_windows.go
src/internal/syscall/windows/at_windows_test.go
src/internal/syscall/windows/syscall_windows.go
src/internal/syscall/windows/types_windows.go
src/internal/syscall/windows/zsyscall_windows.go