Simplify hasExt
This commit is contained in:
parent
dd33a8b252
commit
c5621104df
4
Util.hs
4
Util.hs
@ -32,9 +32,7 @@ getExt fp
|
|||||||
|
|
||||||
-- |Check if the file has an extension.
|
-- |Check if the file has an extension.
|
||||||
hasExt :: FilePath -> Bool
|
hasExt :: FilePath -> Bool
|
||||||
hasExt fp
|
hasExt = (>1) . length . splitBy (== '.')
|
||||||
| (<= 1) . length . splitBy (== '.') $ fp = False
|
|
||||||
| otherwise = True
|
|
||||||
|
|
||||||
|
|
||||||
-- |Split an array into subarrays depending on a given condition.
|
-- |Split an array into subarrays depending on a given condition.
|
||||||
|
Loading…
Reference in New Issue
Block a user