diff options
| author | Damien Neil <dneil@google.com> | 2023-02-21 11:46:39 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-02-21 20:38:30 +0000 |
| commit | 34e701ece2138ebb8276c2d413a6ea1ee1ed84a4 (patch) | |
| tree | 139e07e273f6571f6c6d802c2a8b989ce4c4439b /src/path/filepath/path.go | |
| parent | 481a6beba5a76403cd1c4be2fe7a6662439984c7 (diff) | |
| download | go-34e701ece2138ebb8276c2d413a6ea1ee1ed84a4.tar.xz | |
path/filepath: document that Clean does not change Windows volume names
Fixes #58348
Change-Id: I4aac0285f11618a45aca6b13c2da2a10a803a9b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/469955
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/path/filepath/path.go')
| -rw-r--r-- | src/path/filepath/path.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/path/filepath/path.go b/src/path/filepath/path.go index 32dd887998..5200208117 100644 --- a/src/path/filepath/path.go +++ b/src/path/filepath/path.go @@ -84,6 +84,10 @@ const ( // If the result of this process is an empty string, Clean // returns the string ".". // +// On Windows, Clean does not modify the volume name other than to replace +// occurrences of "/" with `\`. +// For example, Clean("//host/share/../x") returns `\\host\share\x`. +// // See also Rob Pike, “Lexical File Names in Plan 9 or // Getting Dot-Dot Right,” // https://9p.io/sys/doc/lexnames.html |
