diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/src/Compiler.hs | 2 | ||||
-rw-r--r-- | compiler/src/Files.hs | 6 | ||||
-rw-r--r-- | compiler/src/Processors.hs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/compiler/src/Compiler.hs b/compiler/src/Compiler.hs index dbe6cae..0a3e540 100644 --- a/compiler/src/Compiler.hs +++ b/compiler/src/Compiler.hs | |||
@@ -73,7 +73,7 @@ compileGallery inputDirPath outputDirPath rebuildAll = | |||
73 | let sourceTree = filterDir galleryDirFilter inputDir | 73 | let sourceTree = filterDir galleryDirFilter inputDir |
74 | inputTree <- readInputTree sourceTree | 74 | inputTree <- readInputTree sourceTree |
75 | 75 | ||
76 | invalidateCache <- isOutdated inputGalleryConf outputIndex | 76 | invalidateCache <- isOutdated False inputGalleryConf outputIndex |
77 | let cache = if invalidateCache || rebuildAll then skipCached else withCached | 77 | let cache = if invalidateCache || rebuildAll then skipCached else withCached |
78 | let itemProc = itemProcessor (pictureMaxResolution config) cache | 78 | let itemProc = itemProcessor (pictureMaxResolution config) cache |
79 | let thumbnailProc = thumbnailProcessor (thumbnailResolution config) cache | 79 | let thumbnailProc = thumbnailProcessor (thumbnailResolution config) cache |
diff --git a/compiler/src/Files.hs b/compiler/src/Files.hs index fb46c33..079da61 100644 --- a/compiler/src/Files.hs +++ b/compiler/src/Files.hs | |||
@@ -131,8 +131,8 @@ remove path = | |||
131 | putStrLn $ "Removing:\t" ++ path | 131 | putStrLn $ "Removing:\t" ++ path |
132 | removePathForcibly path | 132 | removePathForcibly path |
133 | 133 | ||
134 | isOutdated :: FilePath -> FilePath -> IO Bool | 134 | isOutdated :: Bool -> FilePath -> FilePath -> IO Bool |
135 | isOutdated ref target = | 135 | isOutdated onMissingTarget ref target = |
136 | do | 136 | do |
137 | refExists <- doesPathExist ref | 137 | refExists <- doesPathExist ref |
138 | targetExists <- doesPathExist target | 138 | targetExists <- doesPathExist target |
@@ -142,4 +142,4 @@ isOutdated ref target = | |||
142 | targetTime <- getModificationTime target | 142 | targetTime <- getModificationTime target |
143 | return (targetTime < refTime) | 143 | return (targetTime < refTime) |
144 | else | 144 | else |
145 | return True | 145 | return onMissingTarget |
diff --git a/compiler/src/Processors.hs b/compiler/src/Processors.hs index 67f8619..7362822 100644 --- a/compiler/src/Processors.hs +++ b/compiler/src/Processors.hs | |||
@@ -140,7 +140,7 @@ withCached processor inputPath outputPath = | |||
140 | fileExists <- doesFileExist outputPath | 140 | fileExists <- doesFileExist outputPath |
141 | if fileExists then | 141 | if fileExists then |
142 | do | 142 | do |
143 | needUpdate <- isOutdated inputPath outputPath | 143 | needUpdate <- isOutdated True inputPath outputPath |
144 | if needUpdate then update else skip | 144 | if needUpdate then update else skip |
145 | else | 145 | else |
146 | update | 146 | update |