This commit is contained in:
Joey Hess 2019-01-01 22:48:14 -04:00
parent ec1b9da72f
commit ba2c0663f9
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -169,7 +169,7 @@ toRawFilePath = encodeBS'
{- Converts a [Word8] to a FilePath, encoding using the filesystem encoding.
-
- w82c produces a String, which may contain Chars that are invalid
- w82s produces a String, which may contain Chars that are invalid
- unicode. From there, this is really a simple matter of applying the
- file system encoding, only complicated by GHC's interface to doing so.
-
@ -182,8 +182,6 @@ encodeW8 w8 = unsafePerformIO $ do
enc <- Encoding.getFileSystemEncoding
GHC.withCString Encoding.char8 (w82s w8) $ GHC.peekCString enc
{- Useful when you want the actual number of bytes that will be used to
- represent the FilePath on disk. -}
decodeW8 :: FilePath -> [Word8]
decodeW8 = s2w8 . _encodeFilePath