aboutsummaryrefslogtreecommitdiff
path: root/compiler/src
diff options
context:
space:
mode:
authorpacien2021-06-25 12:05:48 +0200
committerpacien2021-06-25 12:05:48 +0200
commit06228f6620643ef591eceeb86eb1b10efce69ef0 (patch)
treeb4d2c6390236e5aa7d0837516d49cc3ca9440e11 /compiler/src
parenta4425869ea15234fee79b7d1219a3bea7ffb23a2 (diff)
downloadldgallery-06228f6620643ef591eceeb86eb1b10efce69ef0.tar.gz
compiler/Input: remove duplicate assertion on input file tree
Diffstat (limited to 'compiler/src')
-rw-r--r--compiler/src/Input.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/src/Input.hs b/compiler/src/Input.hs
index 48931ec..4cfabe6 100644
--- a/compiler/src/Input.hs
+++ b/compiler/src/Input.hs
@@ -1,7 +1,7 @@
1-- ldgallery - A static generator which turns a collection of tagged 1-- ldgallery - A static generator which turns a collection of tagged
2-- pictures into a searchable web gallery. 2-- pictures into a searchable web gallery.
3-- 3--
4-- Copyright (C) 2019-2020 Pacien TRAN-GIRARD 4-- Copyright (C) 2019-2021 Pacien TRAN-GIRARD
5-- 5--
6-- This program is free software: you can redistribute it and/or modify 6-- This program is free software: you can redistribute it and/or modify
7-- it under the terms of the GNU Affero General Public License as 7-- it under the terms of the GNU Affero General Public License as
@@ -100,9 +100,7 @@ readSidecarFile filepath =
100 100
101 101
102readInputTree :: AnchoredFSNode -> IO InputTree 102readInputTree :: AnchoredFSNode -> IO InputTree
103readInputTree (AnchoredFSNode _ File{}) = 103readInputTree (AnchoredFSNode anchor root) = mkDirNode root
104 throw $ AssertionFailed "Input directory is a file"
105readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root
106 where 104 where
107 mkInputNode :: Map.Map FileName FSNode -> FSNode -> IO (Maybe InputTree) 105 mkInputNode :: Map.Map FileName FSNode -> FSNode -> IO (Maybe InputTree)
108 mkInputNode dir file@File{path} | not (isSidecar file) && not (isThumbnail file) = 106 mkInputNode dir file@File{path} | not (isSidecar file) && not (isThumbnail file) =