]> Cypherpunks repositories - gostls13.git/commit
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>
Fri, 6 Feb 2026 19:28:15 +0000 (11:28 -0800)
commitdb5882ea9bf63849d554910f486c4c5cfea08852
tree9bc7f3dc47eda4bc43ec071b69ed408333ddc726
parentf8f87129646ca3821b3926e649c856a960d6bc9e
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.

Fixes #77402

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>
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