go/src/path
Alex Brainman d154ef60a0 path/filepath: change IsAbs("NUL") to return true
This CL changes IsAbs to return true for "NUL" and other Windows
reserved filenames (search
https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file
for NUL for details). os.Open("NUL") and os.Stat("NUL") work
regardless of what current directory is, and it is mistake to join
"NUL" with current directory when building full path. Changing
IsAbs("NUL") to return true fixes that mistake.

Fixes #28035

Change-Id: Ife8f8aee48400702613ede8fc6834fd43e6e0f03
Reviewed-on: https://go-review.googlesource.com/c/145220
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-11-02 07:24:50 +00:00
..
filepath path/filepath: change IsAbs("NUL") to return true 2018-11-02 07:24:50 +00:00
example_test.go path: add example for Match 2018-02-13 18:45:33 +00:00
match.go path: remove filename mentions from pattern godocs 2018-02-14 10:17:44 +00:00
match_test.go path: present the correct error message in TestMatch 2018-07-29 19:18:48 +00:00
path.go all: revert "all: prefer strings.LastIndexByte over strings.LastIndex" 2017-10-05 23:19:42 +00:00
path_test.go path: fix up bizarre test 2016-03-16 03:59:03 +00:00