temporary revert "use conversion functions from filepath-bytestring"

This reverts commit 75c40279c1.

Debian unstable is one version too old, so this can be de-reverted in a
bit.
This commit is contained in:
Joey Hess 2019-12-27 19:29:09 -04:00
parent 023aa3d30f
commit 3a04af7927
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 15 additions and 6 deletions

View file

@ -43,7 +43,6 @@ import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.UTF8 as S8
import qualified Data.ByteString.Lazy.UTF8 as L8
#endif
import System.FilePath.ByteString (RawFilePath, encodeFilePath, decodeFilePath)
import Utility.Exception
import Utility.Split
@ -172,11 +171,21 @@ encodeBL' = L.pack . decodeW8
encodeBL' = L8.fromString
#endif
fromRawFilePath :: RawFilePath -> FilePath
fromRawFilePath = decodeFilePath
{- 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 = decodeBS'
{- 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 = encodeFilePath
toRawFilePath = encodeBS'
{- Converts a [Word8] to a FilePath, encoding using the filesystem encoding.
-

View file

@ -321,7 +321,7 @@ Executable git-annex
directory (>= 1.2),
disk-free-space,
filepath,
filepath-bytestring (>= 1.4.2.1.1),
filepath-bytestring,
IfElse,
hslogger,
monad-logger,

View file

@ -24,7 +24,7 @@ extra-deps:
- sandi-0.5
- http-client-0.5.14
- silently-1.2.5.1
- filepath-bytestring-1.4.2.1.1
- filepath-bytestring-1.4.2.1.0
explicit-setup-deps:
git-annex: true
resolver: lts-13.29