]> Cypherpunks repositories - gostls13.git/commit
os: make MkdirAll support volume names
authorqmuntal <quimmuntal@gmail.com>
Tue, 8 Aug 2023 13:31:43 +0000 (15:31 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Wed, 9 Aug 2023 15:15:57 +0000 (15:15 +0000)
commitcd589c8a73415afbf94a8976f20cbed9d4061ba6
tree4570b35a090562f95db0b5fcfea51c9a00ea6b7b
parentf617a6c8bf1ee3e54459f60acd2ec85ff31f6d4c
os: make MkdirAll support volume names

MkdirAll fails to create directories under root paths using volume
names (e.g. //?/Volume{GUID}/foo). This is because fixRootDirectory
only handle extended length paths using drive letters (e.g. //?/C:/foo).

This CL fixes that issue by also detecting volume names without path
separator.

Updates #22230
Fixes #39785

Change-Id: I813fdc0b968ce71a4297f69245b935558e6cd789
Reviewed-on: https://go-review.googlesource.com/c/go/+/517015
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/internal/syscall/windows/syscall_windows.go
src/internal/syscall/windows/zsyscall_windows.go
src/os/path.go
src/os/path_plan9.go
src/os/path_unix.go
src/os/path_windows.go
src/os/path_windows_test.go