fix windows build

This commit is contained in:
Joey Hess 2025-01-29 15:36:41 -04:00
parent 2940cfcd18
commit 1b7293fb67
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -43,7 +43,7 @@ fromOsPath :: OsPath -> RawFilePath
-- On Windows, OsString contains a ShortByteString that is
-- utf-16 encoded. So have to convert the input from that.
-- This is relatively expensive.
fromOsPath = toRawFilePath . cWcharsToChars_UCS2 . BS16.unpack . getWindowsString
fromOsPath = toRawFilePath . cWcharsToChars_UCS2 . BS16.unpack . getWindowsString . getOsString
#else
fromOsPath = S.fromShort . getPosixString . getOsString
#endif