OsPath transition Windows build fixes
This gets it building on Windows again, with 1 test suite failure (addurl). Sponsored-by: Kevin Mueller
This commit is contained in:
parent
9dc43396b3
commit
a149336a59
23 changed files with 58 additions and 62 deletions
|
@ -43,7 +43,6 @@ import qualified Utility.OsString as OS
|
|||
|
||||
#ifdef mingw32_HOST_OS
|
||||
import Data.Char
|
||||
import Utility.FileSystemEncoding
|
||||
#endif
|
||||
|
||||
copyright :: Authored t => t
|
||||
|
@ -230,11 +229,11 @@ relPathDirToFileAbs from to
|
|||
numcommon = length common
|
||||
#ifdef mingw32_HOST_OS
|
||||
normdrive = map toLower
|
||||
. fromOsPath
|
||||
-- Get just the drive letter, removing any leading
|
||||
-- path separator, which takeDrive leaves on the drive
|
||||
-- letter.
|
||||
. dropWhileEnd (isPathSeparator . fromIntegral . ord)
|
||||
. fromOsPath
|
||||
. OS.dropWhileEnd isPathSeparator
|
||||
. takeDrive
|
||||
#endif
|
||||
|
||||
|
@ -261,7 +260,7 @@ searchPath command
|
|||
indir d = check (d </> command')
|
||||
check f = firstM doesFileExist
|
||||
#ifdef mingw32_HOST_OS
|
||||
[f, f <> ".exe"]
|
||||
[f, f <> literalOsPath ".exe"]
|
||||
#else
|
||||
[f]
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue