fix test suite failure on windows
This was maybe a real bug too, although I don't know what circumstances it would be a problem. See comment for analysis of this windows drive letter wackyness issue. Sponsored-by: Brock Spratlen on Patreon
This commit is contained in:
parent
6db7079cb0
commit
9595a247ae
3 changed files with 37 additions and 1 deletions
|
@ -187,7 +187,13 @@ relPathDirToFileAbs from to
|
|||
dotdots = replicate (length pfrom - numcommon) ".."
|
||||
numcommon = length common
|
||||
#ifdef mingw32_HOST_OS
|
||||
normdrive = map toLower . takeWhile (/= ':') . fromRawFilePath . takeDrive
|
||||
normdrive = map toLower
|
||||
-- Get just the drive letter, removing any leading
|
||||
-- path separator, which takeDrive leaves on the drive
|
||||
-- letter.
|
||||
. dropWhileEnd (isPathSeparator . fromIntegral . ord)
|
||||
. fromRawFilePath
|
||||
. takeDrive
|
||||
#endif
|
||||
|
||||
{- Checks if a command is available in PATH.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue