]> Cypherpunks repositories - gostls13.git/commit
os: use minimal file permissions when opening parent directory in RemoveAll
authorqmuntal <quimmuntal@gmail.com>
Fri, 27 Jun 2025 09:16:54 +0000 (11:16 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Fri, 27 Jun 2025 20:56:42 +0000 (13:56 -0700)
commite81c624656e415626c7ac3a97768f5c2717979a4
tree03ae3882bc1f3d835a5d3d51ea487eaa4d901a0c
parent2a22aefa1f7befb0ac7a95c918b75b05919c1907
os: use minimal file permissions when opening parent directory in RemoveAll

On Windows, the process might not have read permission on the parent
directory, but still can delete files in it. This change allows
RemoveAll to open the parent directory with minimal permissions, which
is sufficient for deleting child files.

Fixes #74134.

Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-windows-arm64
Change-Id: I5d5c5977caaebf6e0f93fb2313b0ceb346f70e05
Reviewed-on: https://go-review.googlesource.com/c/go/+/684515
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/os/removeall_at.go