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.
This commit is contained in:
parent
3d420f7c94
commit
bf86b5ca16
8 changed files with 40 additions and 33 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue