]> Cypherpunks repositories - gostls13.git/commit
os: do not report ModeDir for symlinks on windows
authorAlex Brainman <alex.brainman@gmail.com>
Wed, 26 Apr 2017 04:49:58 +0000 (14:49 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Wed, 26 Apr 2017 23:17:23 +0000 (23:17 +0000)
commit1989921aef60c83e6f9127a8448fb5ede10e9acc
treeac47266b4fa02d7a9d0948b40ba100cd9fd80edd
parent3d86d45dd60358636c569e9cf06b23b5e0e04e8a
os: do not report ModeDir for symlinks on windows

When using Lstat against symlinks that point to a directory,
the function returns FileInfo with both ModeDir and ModeSymlink set.
Change that to never set ModeDir if ModeSymlink is set.

Fixes #10424
Fixes #17540
Fixes #17541

Change-Id: Iba280888aad108360b8c1f18180a24493fe7ad2b
Reviewed-on: https://go-review.googlesource.com/41830
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/archive/tar/tar_test.go
src/os/os_windows_test.go
src/os/types_windows.go
src/path/filepath/path_test.go
src/path/filepath/path_windows_test.go