From 7431b90861d3626eb3a34bec6f9ba274e061a6a7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 17 Jun 2013 20:51:36 -0400 Subject: 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. --- Command/Fsck.hs | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'Command') 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. -} -- cgit v1.2.3