diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2015-10-15 21:29:54 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2015-10-15 21:29:54 -0400 |
commit | 7f5caf3594c8e1676c06841e5cfab5589f2bb171 (patch) | |
tree | eff9312cc9ebd67aa1d6d23f6f659e56f5b4923d /src | |
parent | 093d277aea8ae9fb423d58a45849a84f0d75b58a (diff) |
Run the validAlbum filter before displaying the albums.
Diffstat (limited to 'src')
-rw-r--r-- | src/PhotoStore.hs | 4 |
1 files 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 |