diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-12-15 21:08:22 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-12-15 21:08:22 -0400 |
| commit | 47a2b72bed3770d3dfb26c4142479c436a11ce55 (patch) | |
| tree | 3d67f32c91338193a21aadb26f0d001d5cec9670 /src/Utility/FileSystemEncoding.hs | |
| parent | 571318218c5598ad841cc3dff73c9fee2c7216ef (diff) | |
Merged Utility changes from git-annex.
Diffstat (limited to 'src/Utility/FileSystemEncoding.hs')
| -rw-r--r-- | src/Utility/FileSystemEncoding.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Utility/FileSystemEncoding.hs b/src/Utility/FileSystemEncoding.hs index 2d9691d5..67341d37 100644 --- a/src/Utility/FileSystemEncoding.hs +++ b/src/Utility/FileSystemEncoding.hs @@ -29,6 +29,7 @@ import System.IO.Unsafe import qualified Data.Hash.MD5 as MD5 import Data.Word import Data.Bits.Utils +import Data.List import Data.List.Utils import qualified Data.ByteString.Lazy as L #ifdef mingw32_HOST_OS @@ -125,12 +126,12 @@ decodeW8 = s2w8 . _encodeFilePath {- Like encodeW8 and decodeW8, but NULs are passed through unchanged. -} encodeW8NUL :: [Word8] -> FilePath -encodeW8NUL = join nul . map encodeW8 . split (s2w8 nul) +encodeW8NUL = intercalate nul . map encodeW8 . split (s2w8 nul) where nul = ['\NUL'] decodeW8NUL :: FilePath -> [Word8] -decodeW8NUL = join (s2w8 nul) . map decodeW8 . split nul +decodeW8NUL = intercalate (s2w8 nul) . map decodeW8 . split nul where nul = ['\NUL'] |
