]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - src/Configuration.hs
Don't remove imported files by default.
[dead/htsn-import.git] / src / Configuration.hs
index 168136a58ad6adb25bc72df12404d98e52acc7fc..4d76c739d25be973c33f49feab618284fa05f949 100644 (file)
@@ -24,6 +24,7 @@ data Configuration =
     connection_string :: ConnectionString,
     log_file          :: Maybe FilePath,
     log_level         :: Priority,
+    remove            :: Bool,
     syslog            :: Bool }
     deriving (Show)
 
@@ -35,6 +36,7 @@ instance Default Configuration where
           connection_string = def,
           log_file          = def,
           log_level         = INFO,
+          remove            = def,
           syslog            = def }
 
 
@@ -50,6 +52,7 @@ merge_optional cfg opt_cfg =
     (merge (connection_string cfg) (OC.connection_string opt_cfg))
     (OC.merge_maybes (log_file cfg) (OC.log_file opt_cfg))
     (merge (log_level cfg) (OC.log_level opt_cfg))
+    (merge (remove cfg) (OC.remove opt_cfg))
     (merge (syslog cfg) (OC.syslog opt_cfg))
   where
     -- | If the thing on the right is Just something, return that