aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2023-01-04 17:23:46 -0500
committerGopher Robot <gobot@golang.org>2023-01-23 22:46:55 +0000
commit3e44b7d07a7b3c6233eb1bf4cf3cb00a0b85adec (patch)
tree7d404b995c7cba691854cd313f993e0e38987c50 /src/cmd
parent2423370136d4b1915d06bb1aaacbedaa900bc5c7 (diff)
downloadgo-3e44b7d07a7b3c6233eb1bf4cf3cb00a0b85adec.tar.xz
os: treat non-symlink reparse points as irregular files
Prior to this change (as of CL 143578), our stat function attempted to resolve all reparse points as if they were symlinks. This results in an additional call to CreateFile when statting a symlink file: we use CreateFile once to obtain the reparse tag and check whether the file is actually a symlink, and if it is we call CreateFile again without FILE_FLAG_OPEN_REPARSE_POINT to stat the link target. Fortunately, since symlinks are rare on Windows that overhead shouldn't be a big deal in practice. Fixes #42919. Change-Id: If453930c6e98040cd6525ac4aea60a84498c9579 Reviewed-on: https://go-review.googlesource.com/c/go/+/460595 Reviewed-by: Quim Muntal <quimmuntal@gmail.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd')
0 files changed, 0 insertions, 0 deletions