From 85a55b5206a401b8726296bd47c307752e09d8b5 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 5 Jan 2020 18:39:08 +0100 Subject: compiler: exclude dir thumbnails from items --- compiler/src/Input.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'compiler/src') 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{}) = readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root where mkInputNode :: FSNode -> IO (Maybe InputTree) - mkInputNode file@File{path} | not $ isSidecar file = - readSidecarFile (localPath $ anchor /> path <.> sidecarExt) - >>= return . InputFile path - >>= return . Just + mkInputNode file@File{path} + | (not $ isSidecar file) && (not $ isThumbnail file) = + readSidecarFile (localPath $ anchor /> path <.> sidecarExt) + >>= return . InputFile path + >>= return . Just mkInputNode File{} = return Nothing mkInputNode dir@Dir{} = mkDirNode dir >>= return . Just -- cgit v1.2.3