avoid using dropWhileEnd
That needs bytestring-0.11.1.0 and several builds don't have that.
This commit is contained in:
parent
c6669990fb
commit
a52d5cc903
1 changed files with 2 additions and 2 deletions
|
@ -105,14 +105,14 @@ isGitRemoteAnnexKey u k =
|
||||||
case fromKey keyVariety k of
|
case fromKey keyVariety k of
|
||||||
GitBundleKey -> sameuuid $ \b ->
|
GitBundleKey -> sameuuid $ \b ->
|
||||||
-- Remove the checksum that comes after the UUID.
|
-- Remove the checksum that comes after the UUID.
|
||||||
let b' = B8.dropWhileEnd (/= '-') b
|
let b' = fst $ B8.spanEnd (/= '-') b
|
||||||
in B8.take (B8.length b' - 1) b'
|
in B8.take (B8.length b' - 1) b'
|
||||||
GitManifestKey -> sameuuid $ \b ->
|
GitManifestKey -> sameuuid $ \b ->
|
||||||
-- Remove an optional extension after the UUID.
|
-- Remove an optional extension after the UUID.
|
||||||
-- (A UUID never contains '.')
|
-- (A UUID never contains '.')
|
||||||
if '.' `B8.elem` b
|
if '.' `B8.elem` b
|
||||||
then
|
then
|
||||||
let b' = B8.dropWhileEnd (/= '.') b
|
let b' = fst $ B8.spanEnd (/= '.') b
|
||||||
in B8.take (B8.length b' - 1) b'
|
in B8.take (B8.length b' - 1) b'
|
||||||
else b
|
else b
|
||||||
_ -> False
|
_ -> False
|
||||||
|
|
Loading…
Add table
Reference in a new issue