diff options
| author | Ian Lance Taylor <iant@golang.org> | 2018-02-19 13:26:01 -0800 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2018-02-23 18:37:09 +0000 |
| commit | b86e76681366447798c94abb959bb60875bcc856 (patch) | |
| tree | fa6dcc41748dc1355b88fb72d88850d72be7211e /src/runtime/malloc.go | |
| parent | bae3fd66279cf679b686ae68c35980334d9ff315 (diff) | |
| download | go-b86e76681366447798c94abb959bb60875bcc856.tar.xz | |
path: use OS-specific function in MkdirAll, don't always keep trailing slash
CL 86295 changed MkdirAll to always pass a trailing path separator to
support extended-length paths on Windows.
However, when Stat is called on an existing file followed by trailing
slash, it will return a "not a directory" error, skipping the fast
path at the beginning of MkdirAll.
This change fixes MkdirAll to only pass the trailing path separator
where required on Windows, by using an OS-specific function fixRootDirectory.
Updates #23918
Change-Id: I23f84a20e65ccce556efa743d026d352b4812c34
Reviewed-on: https://go-review.googlesource.com/95255
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David du Colombier <0intro@gmail.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/runtime/malloc.go')
0 files changed, 0 insertions, 0 deletions
