projects
/
git-annex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db9dbc3
)
simplify
author
Joey Hess
<joeyh@joeyh.name>
Thu, 20 Feb 2020 22:22:31 +0000
(18:22 -0400)
committer
Joey Hess
<joeyh@joeyh.name>
Thu, 20 Feb 2020 22:22:31 +0000
(18:22 -0400)
Backend/Hash.hs
patch
|
blob
|
history
diff --git
a/Backend/Hash.hs
b/Backend/Hash.hs
index 5465f05c3e01340e3466ba946a0a9ad43e799f49..e8fea3c035e94663c12d531a4398228086153ba8 100644
(file)
--- a/
Backend/Hash.hs
+++ b/
Backend/Hash.hs
@@
-156,9
+156,7
@@
keyHash = fst . splitKeyNameExtension
validInExtension :: Word8 -> Bool
validInExtension c
- | c >= 48 && c <= 57 = True -- numbers
- | c >= 65 && c <= 90 = True -- A-Z
- | c >= 97 && c <= 122 = True -- a-z
+ | isAlphaNum (chr (fromIntegral c)) = True
| c <= 127 = False -- other ascii, spaces, punctuation, control chars
| otherwise = True -- utf8 is allowed, also other encodings