use conversion functions from filepath-bytestring (again)
This reverts commit 3a04af7927
.
This commit is contained in:
parent
dfb25ecc29
commit
b68a8d8968
2 changed files with 5 additions and 14 deletions
|
@ -43,6 +43,7 @@ import qualified Data.ByteString.Lazy as L
|
||||||
import qualified Data.ByteString.UTF8 as S8
|
import qualified Data.ByteString.UTF8 as S8
|
||||||
import qualified Data.ByteString.Lazy.UTF8 as L8
|
import qualified Data.ByteString.Lazy.UTF8 as L8
|
||||||
#endif
|
#endif
|
||||||
|
import System.FilePath.ByteString (RawFilePath, encodeFilePath, decodeFilePath)
|
||||||
|
|
||||||
import Utility.Exception
|
import Utility.Exception
|
||||||
import Utility.Split
|
import Utility.Split
|
||||||
|
@ -171,21 +172,11 @@ encodeBL' = L.pack . decodeW8
|
||||||
encodeBL' = L8.fromString
|
encodeBL' = L8.fromString
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{- Recent versions of the unix package have this alias; defined here
|
|
||||||
- for backwards compatibility. -}
|
|
||||||
type RawFilePath = S.ByteString
|
|
||||||
|
|
||||||
{- Note that the RawFilePath is assumed to never contain NUL,
|
|
||||||
- since filename's don't. This should only be used with actual
|
|
||||||
- RawFilePaths not arbitrary ByteString that may contain NUL. -}
|
|
||||||
fromRawFilePath :: RawFilePath -> FilePath
|
fromRawFilePath :: RawFilePath -> FilePath
|
||||||
fromRawFilePath = decodeBS'
|
fromRawFilePath = decodeFilePath
|
||||||
|
|
||||||
{- Note that the FilePath is assumed to never contain NUL,
|
|
||||||
- since filename's don't. This should only be used with actual FilePaths
|
|
||||||
- not arbitrary String that may contain NUL. -}
|
|
||||||
toRawFilePath :: FilePath -> RawFilePath
|
toRawFilePath :: FilePath -> RawFilePath
|
||||||
toRawFilePath = encodeBS'
|
toRawFilePath = encodeFilePath
|
||||||
|
|
||||||
{- Converts a [Word8] to a FilePath, encoding using the filesystem encoding.
|
{- Converts a [Word8] to a FilePath, encoding using the filesystem encoding.
|
||||||
-
|
-
|
||||||
|
|
|
@ -296,7 +296,7 @@ source-repository head
|
||||||
custom-setup
|
custom-setup
|
||||||
Setup-Depends: base (>= 4.11.1.0), hslogger, split, unix-compat, process,
|
Setup-Depends: base (>= 4.11.1.0), hslogger, split, unix-compat, process,
|
||||||
filepath, exceptions, bytestring, directory, IfElse, data-default,
|
filepath, exceptions, bytestring, directory, IfElse, data-default,
|
||||||
filepath-bytestring (>= 1.4.2.1.0),
|
filepath-bytestring (>= 1.4.2.1.1),
|
||||||
utf8-string, transformers, Cabal
|
utf8-string, transformers, Cabal
|
||||||
|
|
||||||
Executable git-annex
|
Executable git-annex
|
||||||
|
@ -321,7 +321,7 @@ Executable git-annex
|
||||||
directory (>= 1.2),
|
directory (>= 1.2),
|
||||||
disk-free-space,
|
disk-free-space,
|
||||||
filepath,
|
filepath,
|
||||||
filepath-bytestring (>= 1.4.2.1.0),
|
filepath-bytestring (>= 1.4.2.1.1),
|
||||||
IfElse,
|
IfElse,
|
||||||
hslogger,
|
hslogger,
|
||||||
monad-logger,
|
monad-logger,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue