summaryrefslogtreecommitdiff
path: root/Command/Fsck.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-06-17 20:51:36 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-06-17 20:51:36 -0400
commit7431b90861d3626eb3a34bec6f9ba274e061a6a7 (patch)
tree2649e0de76514fe45d88101cdf55b964ca5d25a1 /Command/Fsck.hs
parent2b207ae6e3aa80d87504d3dc7fa55e71dff37541 (diff)
remove workaround for old bug that was only in one release
It's causing some problem on windows, see http://git-annex.branchable.com/bugs/windows_port_-_repo_can__39__t_pull_newly_added_files_/#comment-45df9748bba687d95e3c96b3877ea925 And only affected WORM backend, and for one release well over a year ago, so could well be bitrotted.
Diffstat (limited to 'Command/Fsck.hs')
-rw-r--r--Command/Fsck.hs25
1 files changed, 7 insertions, 18 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 9af6a4a7c..a831dceb4 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -206,24 +206,13 @@ fixLink key file = do
maybe noop (go want) have
return True
where
- go want have = when (want /= have) $ do
- {- Version 3.20120227 had a bug that could cause content
- - to be stored in the wrong hash directory. Clean up
- - after the bug by moving the content.
- -}
- whenM (liftIO $ doesFileExist file) $
- unlessM (inAnnex key) $ do
- showNote "fixing content location"
- dir <- liftIO $ parentDir <$> absPath file
- let content = absPathFrom dir have
- unlessM crippledFileSystem $
- liftIO $ allowWrite (parentDir content)
- moveAnnex key content
-
- showNote "fixing link"
- liftIO $ createDirectoryIfMissing True (parentDir file)
- liftIO $ removeFile file
- addAnnexLink want file
+ go want have
+ | want /= have = do
+ showNote "fixing link"
+ liftIO $ createDirectoryIfMissing True (parentDir file)
+ liftIO $ removeFile file
+ addAnnexLink want file
+ | otherwise = noop
{- Checks that the location log reflects the current status of the key,
- in this repository only. -}