aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2020-01-05 18:39:08 +0100
committerpacien2020-01-05 18:39:08 +0100
commit85a55b5206a401b8726296bd47c307752e09d8b5 (patch)
treed5c84e1699c6c571cc3508a12b05fe6df4a782cf
parentefbbc6df28a2f51f087c33c9b81646b68a338205 (diff)
downloadldgallery-85a55b5206a401b8726296bd47c307752e09d8b5.tar.gz
compiler: exclude dir thumbnails from items
-rw-r--r--compiler/src/Input.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/src/Input.hs b/compiler/src/Input.hs
index 02f79f0..86d3ec8 100644
--- a/compiler/src/Input.hs
+++ b/compiler/src/Input.hs
@@ -88,10 +88,11 @@ readInputTree (AnchoredFSNode _ File{}) =
88readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root 88readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root
89 where 89 where
90 mkInputNode :: FSNode -> IO (Maybe InputTree) 90 mkInputNode :: FSNode -> IO (Maybe InputTree)
91 mkInputNode file@File{path} | not $ isSidecar file = 91 mkInputNode file@File{path}
92 readSidecarFile (localPath $ anchor /> path <.> sidecarExt) 92 | (not $ isSidecar file) && (not $ isThumbnail file) =
93 >>= return . InputFile path 93 readSidecarFile (localPath $ anchor /> path <.> sidecarExt)
94 >>= return . Just 94 >>= return . InputFile path
95 >>= return . Just
95 mkInputNode File{} = return Nothing 96 mkInputNode File{} = return Nothing
96 mkInputNode dir@Dir{} = mkDirNode dir >>= return . Just 97 mkInputNode dir@Dir{} = mkDirNode dir >>= return . Just
97 98