avoid abusing from/toRawFilePath for non-FilePaths

This commit is contained in:
Joey Hess 2019-01-01 22:44:04 -04:00
parent c992b20c2b
commit ec1b9da72f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 23 additions and 13 deletions

View file

@ -44,10 +44,10 @@ instance ToUUID B.ByteString where
| otherwise = UUID b
instance FromUUID String where
fromUUID s = fromRawFilePath (fromUUID s)
fromUUID s = decodeBS' (fromUUID s)
instance ToUUID String where
toUUID s = toUUID (toRawFilePath s)
toUUID s = toUUID (encodeBS' s)
-- There is no matching FromUUID U.UUID because a git-annex UUID may
-- be NoUUID or perhaps contain something not allowed in a canonical UUID.