]> Cypherpunks repositories - gostls13.git/commit
path/filepath: handle ".." in normalizing a path on Windows
authorHiroshi Ioka <hirochachacha@gmail.com>
Fri, 19 Aug 2016 00:37:19 +0000 (09:37 +0900)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 30 Aug 2016 20:01:49 +0000 (20:01 +0000)
commit7722d0f90383750784377bb395a8c799868bbab8
tree4ee9e8e7e44a929a3fe8f366a3555bf724e09ab8
parent1319a0ffc79e6a3f278ce39bee90bf6823c647be
path/filepath: handle ".." in normalizing a path on Windows

Current code assumes there are not ".." in the Clean(path).
That's not true. Clean doesn't handle leading "..", so we need to stop
normalization if we see "..".

Fixes #16793

Change-Id: I0a7901bedac17f1210b134d593ebd9f5e8483775
Reviewed-on: https://go-review.googlesource.com/27410
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/path/filepath/export_windows_test.go
src/path/filepath/path_test.go
src/path/filepath/path_windows_test.go
src/path/filepath/symlink_windows.go