diff options
author | 2010-10-17 16:39:30 -0400 | |
---|---|---|
committer | 2010-10-17 16:39:30 -0400 | |
commit | a020b0c25c4e7c2e14d685eac8c4d3aa0e1fef8a (patch) | |
tree | e008a967ab6ea350e97c723924fd8f95ad91d04c /Core.hs | |
parent | 8398b9ab4a654f3f6ec570b70229a8a0030e8ab6 (diff) |
atomic file retrieval from backends
Diffstat (limited to 'Core.hs')
-rw-r--r-- | Core.hs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -29,6 +29,8 @@ startup flags = do shutdown :: Annex () shutdown = do g <- Annex.gitRepo + + -- handle pending commits nocommit <- Annex.flagIsSet NoCommit needcommit <- Annex.flagIsSet NeedCommit if (needcommit && not nocommit) @@ -36,6 +38,13 @@ shutdown = do "git-annex log update", gitStateDir g] else return () + -- clean up any files left in the temp directory + let tmp = annexTmpLocation g + exists <- liftIO $ doesDirectoryExist tmp + if (exists) + then liftIO $ removeDirectoryRecursive $ tmp + else return () + {- configure git to use union merge driver on state files, if it is not - already -} gitAttributes :: Git.Repo -> IO () |