From eb7a652b2244ffa4dd5ba2440b7879127e7c6078 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 27 Dec 2019 10:08:19 +0100 Subject: compiler: implement resource processing but break directory cleanup --- compiler/src/Input.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'compiler/src/Input.hs') diff --git a/compiler/src/Input.hs b/compiler/src/Input.hs index 681f169..64c1933 100644 --- a/compiler/src/Input.hs +++ b/compiler/src/Input.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE DuplicateRecordFields, DeriveGeneric, DeriveAnyClass #-} - -- ldgallery - A static generator which turns a collection of tagged -- pictures into a searchable web gallery. -- @@ -18,6 +16,11 @@ -- You should have received a copy of the GNU Affero General Public License -- along with this program. If not, see . +{-# LANGUAGE + DuplicateRecordFields + , DeriveGeneric + , DeriveAnyClass +#-} module Input ( decodeYamlFile @@ -55,7 +58,7 @@ data InputTree = , sidecar :: Sidecar } | InputDir { path :: Path - , thumbnailPath :: Maybe Path + , dirThumbnailPath :: Maybe Path , items :: [InputTree] } deriving Show @@ -68,8 +71,7 @@ data Sidecar = Sidecar readInputTree :: AnchoredFSNode -> IO InputTree -readInputTree (AnchoredFSNode anchor root@Dir{}) = - filterDir (not . isHidden) root & mkDirNode +readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root where mkInputNode :: FSNode -> IO (Maybe InputTree) mkInputNode (File path@(filename:pathto)) | ".yaml" `isExtensionOf` filename = -- cgit v1.2.3