]> Cypherpunks.ru repositories - gostls13.git/commit
path/filepath: detect Windows CONIN$ and CONOUT$ paths in IsLocal
authorDamien Neil <dneil@google.com>
Thu, 17 Nov 2022 18:06:50 +0000 (10:06 -0800)
committerDamien Neil <dneil@google.com>
Thu, 17 Nov 2022 18:24:36 +0000 (18:24 +0000)
commit217ed955887bd59780313bb468862a697b75decd
treeaff29b8e22094702e9878651b1b47b9b606fd818
parent38b9ff60071fc40d197e7002db1320539e74a678
path/filepath: detect Windows CONIN$ and CONOUT$ paths in IsLocal

CreateFile creates a handle to the console input or screen buffer
when opening a file named CONIN$ or CONOUT$:

https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#consoles

Detect these paths as non-local.

For #56219.

Change-Id: Ib09e76a110d6ec09aef8038074b9bcbae09d00d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/451657
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/path/filepath/path_test.go
src/path/filepath/path_windows.go