diff options
author | pacien | 2019-12-30 01:40:55 +0100 |
---|---|---|
committer | pacien | 2019-12-30 01:40:55 +0100 |
commit | 8a75458290002c765a0fa673912c162020de2bd1 (patch) | |
tree | dd8a6302b6bf786821b1d92f16af10375b9b16a7 /compiler/src/Input.hs | |
parent | ab84d0503e39f0a3acb6f8f5e6706a377aaeaf33 (diff) | |
download | ldgallery-8a75458290002c765a0fa673912c162020de2bd1.tar.gz |
compiler: refactor path handling
Diffstat (limited to 'compiler/src/Input.hs')
-rw-r--r-- | compiler/src/Input.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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 | |||
92 | readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root | 92 | readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root |
93 | where | 93 | where |
94 | mkInputNode :: FSNode -> IO (Maybe InputTree) | 94 | mkInputNode :: FSNode -> IO (Maybe InputTree) |
95 | mkInputNode (File path@(filename:_)) | not (sidecarExt `isExtensionOf` filename) = | 95 | mkInputNode (File path) | not (sidecarExt `isExtensionOf` (fileName path)) = |
96 | readSidecarFile (localPath $ anchor /> path <.> sidecarExt) | 96 | readSidecarFile (localPath $ anchor /> path <.> sidecarExt) |
97 | >>= return . InputFile path | 97 | >>= return . InputFile path |
98 | >>= return . Just | 98 | >>= return . Just |
@@ -110,4 +110,4 @@ readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root | |||
110 | 110 | ||
111 | matchThumbnail :: FSNode -> Bool | 111 | matchThumbnail :: FSNode -> Bool |
112 | matchThumbnail Dir{} = False | 112 | matchThumbnail Dir{} = False |
113 | matchThumbnail (File (filename:_)) = (dropExtension filename) == "thumbnail" | 113 | matchThumbnail (File path) = (dropExtension $ fileName path) == "thumbnail" |