building again after merge

Nice, several conversions fell out.
This commit is contained in:
Joey Hess 2019-12-18 14:57:01 -04:00
parent d5628a16b8
commit 535b153381
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 9 additions and 16 deletions

View file

@ -28,7 +28,6 @@ import Foreign.C.Types
import Key
import Utility.InodeCache
import Utility.FileSize
import Utility.FileSystemEncoding
import Git.Types
import Types.UUID
import Types.Import
@ -79,16 +78,10 @@ instance PersistField ContentIdentifier where
instance PersistFieldSql ContentIdentifier where
sqlType _ = SqlBlob
-- A serialized FilePath. Stored as a ByteString to avoid encoding problems.
-- A serialized RawFilePath.
newtype SFilePath = SFilePath S.ByteString
deriving (Eq, Show)
toSFilePath :: FilePath -> SFilePath
toSFilePath = SFilePath . encodeBS
fromSFilePath :: SFilePath -> FilePath
fromSFilePath (SFilePath b) = decodeBS b
instance PersistField SFilePath where
toPersistValue (SFilePath b) = toPersistValue b
fromPersistValue v = SFilePath <$> fromPersistValue v