aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/exec_linux.go
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2023-07-04 13:39:41 +0200
committerQuim Muntal <quimmuntal@gmail.com>2023-07-07 22:02:26 +0000
commit5c154986094bcc2fb28909cc5f01c9ba1dd9ddd4 (patch)
tree425956de67829f55cd74310146adaed7f803ffeb /src/syscall/exec_linux.go
parent894d24d617bb72d6e1bed7b143f9f7a0ac16b844 (diff)
downloadgo-5c154986094bcc2fb28909cc5f01c9ba1dd9ddd4.tar.xz
os: support reading empty root directories on Windows
GetFileInformationByHandleEx can return `ERROR_FILE_NOT_FOUND` when no files were found in a root directory, as per MS-FSA 2.1.5.6.3 [1]. This error code should not be treated as an error, but rather as an indication that no files were found, in which case `readdir` should return an empty slice. This CL doesn't add any test as it is difficult to trigger this error code. Empty root directories created using Windows utilities such as `net use` always report at least the optional `.` and `..` entries. A reproducer is provided in #61159, but it requires WinFSP to be installed. Fixes #61159 [1] https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fsa/fa8194e0-53ec-413b-8315-e8fa85396fd8 Change-Id: Id46452030f5355c292e5b0abbf5e22af434a84d2 Reviewed-on: https://go-review.googlesource.com/c/go/+/507775 Reviewed-by: Nick Craig-Wood <nickcw@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Quim Muntal <quimmuntal@gmail.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/syscall/exec_linux.go')
0 files changed, 0 insertions, 0 deletions