aboutsummaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/Add.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index b1b830cbc..8a7db0a91 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -113,7 +113,9 @@ start file = ifAnnexed file addpresent add
next $ next $ cleanup file key Nothing =<< inAnnex key
perform :: FilePath -> CommandPerform
-perform file = lockDown file >>= ingest >>= go
+perform file = do
+ lockingfile <- not <$> isDirect
+ lockDown lockingfile file >>= ingest >>= go
where
go (Just key, cache) = next $ cleanup file key cache True
go (Nothing, _) = stop