]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.25] 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>
Thu, 26 Feb 2026 15:38:24 +0000 (07:38 -0800)
commit9f8fa93be5f36f9c6969aafbc42860b9ba4c9452
tree5fe6b3112f8d49317e70c3caa02a1627783c0c17
parentdf7331dc32ada0625ab707c8250f255ced7871a1
[release-branch.go1.25] 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 #77406

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>
Reviewed-on: https://go-review.googlesource.com/c/go/+/746361
Auto-Submit: Mark Freeman <markfreeman@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@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