From 7f5caf3594c8e1676c06841e5cfab5589f2bb171 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Thu, 15 Oct 2015 21:29:54 -0400 Subject: Run the validAlbum filter before displaying the albums. --- src/PhotoStore.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhotoStore.hs b/src/PhotoStore.hs index c6c043e..62d7244 100644 --- a/src/PhotoStore.hs +++ b/src/PhotoStore.hs @@ -30,8 +30,8 @@ getAlbums :: Config -> IO [Album] getAlbums config = do pending <- getDirectoryFiles (pendingPath config) permanent <- getDirectoryFiles (photosPath config) - return ([Album name True | name <- sort pending] ++ - [Album name False | name <- sort permanent]) + return ([Album name True | name <- sort pending, validAlbumName name] ++ + [Album name False | name <- sort permanent, validAlbumName name]) albumDirectory :: Config -> Album -> FilePath albumDirectory config album -- cgit v1.2.3