]> Cypherpunks repositories - gostls13.git/commit
syscall,os: move flags validation from os.OpenFile to syscall.Open
authorqmuntal <quimmuntal@gmail.com>
Thu, 10 Oct 2024 09:01:16 +0000 (11:01 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Thu, 10 Oct 2024 18:44:36 +0000 (18:44 +0000)
commit39fbc4c29a95510a1c62b6b57723aef496cdfbbc
tree8d7675327a02f7d2cb24531bc2ebad12436ffd22
parent0a1c6e3076c4e7dd74b74c594e953e498c272ba1
syscall,os: move flags validation from os.OpenFile to syscall.Open

syscall.Open is the functions that maps Unix/Go flags into Windows
concepts. Part of the flag validation logic was still implemented
in os.OpenFile, move it to syscall.Open for consistency.

A nice side effect is that we don't have to translate the file name
twice in case of an access denied error.

Change-Id: I32c647a9a2a066277c78f53bacb45fb3036f6353
Reviewed-on: https://go-review.googlesource.com/c/go/+/619275
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/os/file_windows.go
src/syscall/syscall_windows.go
src/syscall/syscall_windows_test.go