From 06228f6620643ef591eceeb86eb1b10efce69ef0 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 25 Jun 2021 12:05:48 +0200 Subject: compiler/Input: remove duplicate assertion on input file tree --- compiler/src/Input.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'compiler/src') 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 @@ -- ldgallery - A static generator which turns a collection of tagged -- pictures into a searchable web gallery. -- --- Copyright (C) 2019-2020 Pacien TRAN-GIRARD +-- Copyright (C) 2019-2021 Pacien TRAN-GIRARD -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as @@ -100,9 +100,7 @@ readSidecarFile filepath = readInputTree :: AnchoredFSNode -> IO InputTree -readInputTree (AnchoredFSNode _ File{}) = - throw $ AssertionFailed "Input directory is a file" -readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root +readInputTree (AnchoredFSNode anchor root) = mkDirNode root where mkInputNode :: Map.Map FileName FSNode -> FSNode -> IO (Maybe InputTree) mkInputNode dir file@File{path} | not (isSidecar file) && not (isThumbnail file) = -- cgit v1.2.3