From e7add86f163612d09c4c2ba2b80a4fc6eadf94bf Mon Sep 17 00:00:00 2001 From: qmuntal Date: Wed, 11 Mar 2026 14:56:33 +0100 Subject: internal/syscall/windows: don't force image section checks in Deleteat I originally added the FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK flag because Windows' DeleteFileW used to use it, but it doesn't anymore. Not using that flag makes Deleteat work in more cases. Change-Id: I604ad68330e08bcbd37f33a3bf4e5f7e7f043c16 Reviewed-on: https://go-review.googlesource.com/c/go/+/754180 Reviewed-by: Damien Neil Reviewed-by: Carlos Amedee Auto-Submit: Quim Muntal LUCI-TryBot-Result: Go LUCI --- src/internal/syscall/windows/at_windows.go | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/internal/syscall/windows/at_windows.go b/src/internal/syscall/windows/at_windows.go index a5601493d8..f2f95b8711 100644 --- a/src/internal/syscall/windows/at_windows.go +++ b/src/internal/syscall/windows/at_windows.go @@ -295,7 +295,6 @@ func Deleteat(dirfd syscall.Handle, name string, options uint32) error { &IO_STATUS_BLOCK{}, unsafe.Pointer(&FILE_DISPOSITION_INFORMATION_EX{ Flags: FILE_DISPOSITION_DELETE | - FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK | FILE_DISPOSITION_POSIX_SEMANTICS | // This differs from DeleteFileW, but matches os.Remove's // behavior on Unix platforms of permitting deletion of -- cgit v1.3-5-g9baa