summaryrefslogtreecommitdiff
path: root/Annex/Content
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-22 20:58:27 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-25 15:06:02 -0400
commit65962bdc503a084bf17a488e1a5e03c41fb29b2a (patch)
tree67c9cab2ad06fdb81667109a3574f77359a14fdf /Annex/Content
parent01a004f8b0fe47007d4dd04673bddebfdf22a72c (diff)
improve robustness of fromDirect and replaceFile
Made fromDirect check that a file in the tree has good content (and is not a broken symlink either) before copying it to another file that has the same key. Made replaceFile clean up the temp file if the action that creates it, or the file replacement action fails.
Diffstat (limited to 'Annex/Content')
-rw-r--r--Annex/Content/Direct.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs
index ef2573c34..b9c78f8c0 100644
--- a/Annex/Content/Direct.hs
+++ b/Annex/Content/Direct.hs
@@ -193,7 +193,7 @@ compareInodeCachesWith :: Annex InodeComparisonType
compareInodeCachesWith = ifM inodesChanged ( return Weakly, return Strongly )
{- Copies the contentfile to the associated file, if the associated
- - file has not content. If the associated file does have content,
+ - file has no content. If the associated file does have content,
- even if the content differs, it's left unchanged. -}
addContentWhenNotPresent :: Key -> FilePath -> FilePath -> Annex ()
addContentWhenNotPresent key contentfile associatedfile = do