From 093d277aea8ae9fb423d58a45849a84f0d75b58a Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Thu, 15 Oct 2015 21:24:00 -0400 Subject: Hide albums that start with ".". --- src/PhotoStore.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/PhotoStore.hs b/src/PhotoStore.hs index ead129a..c6c043e 100644 --- a/src/PhotoStore.hs +++ b/src/PhotoStore.hs @@ -24,9 +24,7 @@ data Config = Config getDirectoryFiles path = getDirectoryContents path >>= return . filter f where f filename = not (filename `elem` [".", ".."]) -validAlbumName name = - name /= "." - && name /= ".." +validAlbumName name = not ("." `isPrefixOf` name) getAlbums :: Config -> IO [Album] getAlbums config = do -- cgit v1.2.3