summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-07-07 19:29:36 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-07-07 19:29:36 -0400
commit67dcc1f171f0bbe2b57d20fbafce9f6c9b8f781e (patch)
tree023171ff974e670cf3951033514f86d5b371a654 /Command/Add.hs
parentff531b96778abba9e992103a644ba80f7ddf2397 (diff)
add: Avoid a failure mode that resulted in the file seemingly being deleted (content put in the annex but no symlink present).
Diffstat (limited to 'Command/Add.hs')
-rw-r--r--Command/Add.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index 2831e1b35..e7d16b6c0 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -51,11 +51,11 @@ perform (file, backend) = do
cleanup :: FilePath -> Key -> CommandCleanup
cleanup file key = do
- logStatus key InfoPresent
-
link <- calcGitLink file key
liftIO $ createSymbolicLink link file
+ logStatus key InfoPresent
+
-- touch the symlink to have the same mtime as the file it points to
s <- liftIO $ getFileStatus file
let mtime = modificationTime s