summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Add.hs')
-rw-r--r--Command/Add.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index b6b5753af..ef839b2a3 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -85,8 +85,9 @@ cleanup file key hascontent = do
mtime <- modificationTime <$> getFileStatus file
touch file (TimeSpec mtime) False
- force <- Annex.getState Annex.force
- if force
- then Annex.Queue.add "add" [Param "-f", Param "--"] [file]
- else Annex.Queue.add "add" [Param "--"] [file]
+ params <- ifM (Annex.getState Annex.force)
+ ( return [Param "-f"]
+ , return []
+ )
+ Annex.Queue.add "add" (params++[Param "--"]) [file]
return True