[go] os: support deleting inaccessible files in RemoveAll

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Feb 6, 2026, 2:28:20 PM (2 days ago) Feb 6
to Michal Pristas, Gerrit Bot, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Michael Pratt, Michael Knyszek, Go LUCI, Quim Muntal, Damien Neil, Alex Brainman, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
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-by: Quim Muntal <quimm...@gmail.com>
Reviewed-by: Michael Pratt <mpr...@google.com>
Auto-Submit: Michael Pratt <mpr...@google.com>
Reviewed-by: Michael Knyszek <mkny...@google.com>
Files:
  • M src/internal/syscall/windows/at_windows.go
  • M src/internal/syscall/windows/at_windows_test.go
  • M src/internal/syscall/windows/syscall_windows.go
  • M src/internal/syscall/windows/types_windows.go
  • M src/internal/syscall/windows/zsyscall_windows.go
Change size: M
Delta: 5 files changed, 242 insertions(+), 3 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Michael Knyszek, +1 by Michael Pratt, +2 by Quim Muntal
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ie53bc6f1673de1a8af4dcfb7496daf99e71098cb
Gerrit-Change-Number: 741040
Gerrit-PatchSet: 9
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Alex Brainman <alex.b...@gmail.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Reviewer: Quim Muntal <quimm...@gmail.com>
Gerrit-CC: Michal Pristas <michal....@gmail.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages