From 8a75458290002c765a0fa673912c162020de2bd1 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 30 Dec 2019 01:40:55 +0100 Subject: compiler: refactor path handling --- compiler/src/Input.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/src/Input.hs') diff --git a/compiler/src/Input.hs b/compiler/src/Input.hs index 597394e..cb9fc60 100644 --- a/compiler/src/Input.hs +++ b/compiler/src/Input.hs @@ -92,7 +92,7 @@ readInputTree :: AnchoredFSNode -> IO InputTree readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root where mkInputNode :: FSNode -> IO (Maybe InputTree) - mkInputNode (File path@(filename:_)) | not (sidecarExt `isExtensionOf` filename) = + mkInputNode (File path) | not (sidecarExt `isExtensionOf` (fileName path)) = readSidecarFile (localPath $ anchor /> path <.> sidecarExt) >>= return . InputFile path >>= return . Just @@ -110,4 +110,4 @@ readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root matchThumbnail :: FSNode -> Bool matchThumbnail Dir{} = False - matchThumbnail (File (filename:_)) = (dropExtension filename) == "thumbnail" + matchThumbnail (File path) = (dropExtension $ fileName path) == "thumbnail" -- cgit v1.2.3