summaryrefslogtreecommitdiff
path: root/Annex/Content.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-11-06 15:28:20 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-11-06 15:28:20 -0400
commit90d833e44240dd0a83fd2439fa1a23e490959235 (patch)
tree9a0f4bed733aa274422d932c761b972a754cdd34 /Annex/Content.hs
parentd2ab9f9c90e8a73f99bfad452fd17cc2f77ad230 (diff)
add: Fix error recovery rollback to not move the injested file content out of the annex back to the file, because other files may point to that same content. Instead, copy the injected file content out to recover.
That was not a data loss, but it came close!
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r--Annex/Content.hs8
1 files changed, 0 insertions, 8 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 9648083cb..bc28cc6b4 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -27,7 +27,6 @@ module Annex.Content (
sendAnnex,
prepSendAnnex,
removeAnnex,
- fromAnnex,
moveBad,
KeyLocation(..),
getKeysPresent,
@@ -573,13 +572,6 @@ secureErase file = maybe noop go =<< annexSecureEraseCommand <$> Annex.getGitCon
boolSystem "sh" [Param "-c", Param $ gencmd basecmd]
gencmd = massReplace [ ("%file", shellEscape file) ]
-{- Moves a key's file out of .git/annex/objects/ -}
-fromAnnex :: Key -> FilePath -> Annex ()
-fromAnnex key dest = cleanObjectLoc key $ do
- file <- calcRepo $ gitAnnexLocation key
- thawContent file
- liftIO $ moveFile file dest
-
{- Moves a key out of .git/annex/objects/ into .git/annex/bad, and
- returns the file it was moved to. -}
moveBad :: Key -> Annex FilePath