diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-13 15:40:12 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-13 15:40:12 -0400 |
commit | dd573e70105706bd1a769f74af9c3006dab903d0 (patch) | |
tree | a7593b70c7aedb7ddea3b2165fe95aecee50d923 /Core.hs | |
parent | abebbcfd544953f3a2c9dab042368069fd2d916a (diff) |
fsck bugfixes
Diffstat (limited to 'Core.hs')
-rw-r--r-- | Core.hs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -207,9 +207,11 @@ fromAnnex key dest = do moveBad :: Key -> Annex FilePath moveBad key = do g <- Annex.gitRepo - let src = parentDir $ annexLocation g key + let src = annexLocation g key let dest = annexBadLocation g - liftIO $ renameDirectory src dest + liftIO $ createDirectoryIfMissing True dest + liftIO $ renameFile src (dest ++ takeFileName src) + liftIO $ removeDirectory (parentDir src) return dest {- List of keys whose content exists in .git/annex/objects/ -} |