From 65962bdc503a084bf17a488e1a5e03c41fb29b2a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 22 May 2013 20:58:27 -0400 Subject: 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. --- Remote/Git.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Remote') diff --git a/Remote/Git.hs b/Remote/Git.hs index 32f6a1c7c..05dad469a 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -346,7 +346,7 @@ copyFromRemote' r key file dest forever $ send =<< readSV v let feeder = writeSV v . fromBytesProcessed - bracketIO noop (const $ tryIO $ killThread tid) (a feeder) + bracketIO noop (const $ tryIO $ killThread tid) (const $ a feeder) copyFromRemoteCheap :: Remote -> Key -> FilePath -> Annex Bool copyFromRemoteCheap r key file -- cgit v1.2.3