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/Resource.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/src/Resource.hs') diff --git a/compiler/src/Resource.hs b/compiler/src/Resource.hs index 9d60185..afc8203 100644 --- a/compiler/src/Resource.hs +++ b/compiler/src/Resource.hs @@ -100,7 +100,7 @@ outputDiff resources ref = resPaths resList = map resPath resList ++ thumbnailPaths resList thumbnailPaths :: [ResourceTree] -> [Path] - thumbnailPaths = (concatMap subsequences) . (mapMaybe thumbnailPath) + thumbnailPaths = (concatMap subPaths) . (mapMaybe thumbnailPath) fsPaths :: FSNode -> [Path] fsPaths = map nodePath . tail . flattenDir @@ -109,6 +109,6 @@ cleanupResourceDir :: ResourceTree -> FileName -> IO () cleanupResourceDir resourceTree outputDir = readDirectory outputDir >>= return . outputDiff resourceTree . root - >>= return . sortBy (flip $ comparing length) -- nested files before dirs + >>= return . sortBy (flip $ comparing pathLength) -- nested files before dirs >>= return . map (localPath . (/>) outputDir) >>= mapM_ remove -- cgit v1.2.3