mirror of
https://github.com/Yvee1/hascard.git
synced 2024-11-22 12:51:58 +03:00
FIx crash on empty recents list
This commit is contained in:
parent
43e5c5fd50
commit
62046234ab
@ -69,6 +69,7 @@ initLast (x:xs) = let (xs', y) = initLast xs
|
||||
in (x:xs', y)
|
||||
|
||||
prep :: [FilePath] -> ([String], [FilePath])
|
||||
prep [] = ([], [])
|
||||
prep fps@(fp:_) = if all ((== takeExtension fp) . takeExtension) fps
|
||||
then unzip (map ((\(pre, fn) -> (pre, dropExtension fn)) . splitFileName) fps)
|
||||
else unzip (map splitFileName fps)
|
||||
|
Loading…
Reference in New Issue
Block a user