diff options
Diffstat (limited to 'compiler/src/Compiler.hs')
-rw-r--r-- | compiler/src/Compiler.hs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/src/Compiler.hs b/compiler/src/Compiler.hs index adc4a5f..2a0dccc 100644 --- a/compiler/src/Compiler.hs +++ b/compiler/src/Compiler.hs | |||
@@ -22,7 +22,7 @@ module Compiler | |||
22 | ) where | 22 | ) where |
23 | 23 | ||
24 | 24 | ||
25 | import Control.Monad (liftM2) | 25 | import Control.Monad (liftM2, when) |
26 | import Data.List (any) | 26 | import Data.List (any) |
27 | import System.FilePath ((</>)) | 27 | import System.FilePath ((</>)) |
28 | import qualified System.FilePath.Glob as Glob | 28 | import qualified System.FilePath.Glob as Glob |
@@ -118,11 +118,7 @@ compileGallery inputDirPath outputDirPath excludedDirs rebuildAll cleanOutput = | |||
118 | let galleryBuilder = buildGalleryTree itemProc thumbnailProc (tagsFromDirectories config) | 118 | let galleryBuilder = buildGalleryTree itemProc thumbnailProc (tagsFromDirectories config) |
119 | resources <- galleryBuilder (galleryName config) inputTree | 119 | resources <- galleryBuilder (galleryName config) inputTree |
120 | 120 | ||
121 | if cleanOutput then | 121 | when cleanOutput $ galleryCleanupResourceDir resources outputDirPath |
122 | galleryCleanupResourceDir resources outputDirPath | ||
123 | else | ||
124 | return () | ||
125 | |||
126 | writeJSON outputIndex resources | 122 | writeJSON outputIndex resources |
127 | writeJSON outputViewerConf $ viewer fullConfig | 123 | writeJSON outputViewerConf $ viewer fullConfig |
128 | 124 | ||