Merge branch 'master' into ospath

This commit is contained in:
Joey Hess 2025-01-29 15:37:19 -04:00
commit c309edb8fb
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -86,7 +86,7 @@ bytesFromOsPath :: OsPath -> RawFilePath
-- On Windows, OsString contains a ShortByteString that is
-- utf-16 encoded, but RawFilePath is utf-8.
-- So this is relatively expensive conversion.
bytesFromOsPath = toRawFilePath . cWcharsToChars_UCS2 . BS16.unpack . getWindowsString
bytesFromOsPath = toRawFilePath . cWcharsToChars_UCS2 . BS16.unpack . getWindowsString . getOsString
#else
bytesFromOsPath :: OsPath -> ShortByteString
bytesFromOsPath = getPosixString . getOsString