Follow symlinks in the Win32 code for System.Environment.getExecutablePath
authorAlp Mestanogullari <alp@well-typed.com>
Mon, 27 Nov 2017 14:45:52 +0000 (09:45 -0500)
committerBen Gamari <ben@smart-cactus.org>
Mon, 27 Nov 2017 14:45:53 +0000 (09:45 -0500)
commit62823668c48e13290e2ffe0d593a9f6a95cf628b
tree8d9daf98b5912f3c437fa336daebf8f7c4f7fc95
parent471d6777b94d04ca35fb643834e87b4eb3446e64
Follow symlinks in the Win32 code for System.Environment.getExecutablePath

This partially addresses #14483 by fixing the Windows implementation of
System.Environment.getExecutablePath. This is achieved by using
GetFinalPathNameByHandleW to resolve potential symlinks, while making
sure we do not get back a UNC path (see #14460).

Test Plan: Validate

Reviewers: Phyx, bgamari, angerman, hvr, goldfire

Reviewed By: Phyx, bgamari

GHC Trac Issues: #14483

Differential Revision: https://phabricator.haskell.org/D4227
libraries/base/System/Environment/ExecutablePath.hsc
libraries/base/changelog.md