add: Avoid a failure mode that resulted in the file seemingly being deleted (content put in the annex but no symlink present).

This commit is contained in:
Joey Hess 2011-07-07 19:29:36 -04:00
parent ff531b9677
commit 67dcc1f171
3 changed files with 8 additions and 2 deletions

View file

@ -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