fix bug caught by test suite

This commit is contained in:
Joey Hess 2020-07-31 16:11:50 -04:00
parent 13db029ac0
commit 5a5873e052
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 3 additions and 1 deletions

View file

@ -344,7 +344,7 @@ parseKeyVariety "URL" = URLKey
parseKeyVariety b
| "X" `S.isPrefixOf` b =
let b' = S.tail b
in if S.last b' == fromIntegral (ord 'E')
in if not (S.null b') && S.last b' == fromIntegral (ord 'E')
then ExternalKey (S.init b') (HasExt True)
else ExternalKey b' (HasExt False)
| otherwise = OtherKey b

View file

@ -33,3 +33,5 @@ Thanks in advance.
[[!meta author=kyle]]
[[!tag projects/datalad]]
> [[fixed|done]] and rest of test suite passing --[[Joey]]