improve comments
This commit is contained in:
parent
4a1758fccf
commit
bba74a2b84
1 changed files with 8 additions and 8 deletions
|
@ -86,10 +86,10 @@ encodeBL = L8.fromString
|
||||||
|
|
||||||
decodeBS :: S.ByteString -> FilePath
|
decodeBS :: S.ByteString -> FilePath
|
||||||
#ifndef mingw32_HOST_OS
|
#ifndef mingw32_HOST_OS
|
||||||
-- This is a copy of code from System.FilePath.Internal.decodeFilePath.
|
-- This does the same thing as System.FilePath.ByteString.decodeFilePath,
|
||||||
-- However, older versions of that library truncated at NUL, which this
|
-- with an identical implementation. However, older versions of that library
|
||||||
-- must not do, because it may end up used on something other than a unix
|
-- truncated at NUL, which this must not do, because it may end up used on
|
||||||
-- filepath.
|
-- something other than a unix filepath.
|
||||||
{-# NOINLINE decodeBS #-}
|
{-# NOINLINE decodeBS #-}
|
||||||
decodeBS b = unsafePerformIO $ do
|
decodeBS b = unsafePerformIO $ do
|
||||||
enc <- Encoding.getFileSystemEncoding
|
enc <- Encoding.getFileSystemEncoding
|
||||||
|
@ -100,10 +100,10 @@ decodeBS = S8.toString
|
||||||
|
|
||||||
encodeBS :: FilePath -> S.ByteString
|
encodeBS :: FilePath -> S.ByteString
|
||||||
#ifndef mingw32_HOST_OS
|
#ifndef mingw32_HOST_OS
|
||||||
-- This is a copy of code from System.FilePath.Internal.encodeFilePath.
|
-- This does the same thing as System.FilePath.ByteString.encodeFilePath,
|
||||||
-- However, older versions of that library truncated at NUL, which this
|
-- with an identical implementation. However, older versions of that library
|
||||||
-- must not do, because it may end up used on something other than a unix
|
-- truncated at NUL, which this must not do, because it may end up used on
|
||||||
-- filepath.
|
-- something other than a unix filepath.
|
||||||
{-# NOINLINE encodeBS #-}
|
{-# NOINLINE encodeBS #-}
|
||||||
encodeBS f = unsafePerformIO $ do
|
encodeBS f = unsafePerformIO $ do
|
||||||
enc <- Encoding.getFileSystemEncoding
|
enc <- Encoding.getFileSystemEncoding
|
||||||
|
|
Loading…
Reference in a new issue