diff options
Diffstat (limited to 'Command/Fix.hs')
-rw-r--r-- | Command/Fix.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Command/Fix.hs b/Command/Fix.hs index 4a8f25493..e63cebf42 100644 --- a/Command/Fix.hs +++ b/Command/Fix.hs @@ -16,6 +16,7 @@ import qualified Annex import Annex.Version import Annex.ReplaceFile import Annex.Content +import Annex.Perms import qualified Annex.Queue import qualified Database.Keys #ifdef WITH_CLIBS @@ -70,9 +71,11 @@ start fixwhat file key = do breakHardLink :: FilePath -> Key -> FilePath -> CommandPerform breakHardLink file key obj = do - replaceFile file $ \tmp -> + replaceFile file $ \tmp -> do unlessM (checkedCopyFile key obj tmp) $ error "unable to break hard link" + thawContent tmp + modifyContent obj $ freezeContent obj Database.Keys.storeInodeCaches key [file] next $ return True |