Bug fix: export with -J could fail when two files had the same content.
Exporting is done inside a call to writeLockDbWhile which guarantees there is only one process uploading to a given ExportLocation.
This commit is contained in:
parent
fb921cd0b0
commit
6a30d04ece
3 changed files with 8 additions and 1 deletions
|
@ -283,7 +283,11 @@ performExport r db ek af contentsha loc allfilledvar = do
|
|||
sent <- tryNonAsync $ case ek of
|
||||
AnnexKey k -> ifM (inAnnex k)
|
||||
( notifyTransfer Upload af $
|
||||
upload' (uuid r) k af stdRetry $ \pm -> do
|
||||
-- alwaysUpload because the same key
|
||||
-- could be used for more than one export
|
||||
-- location, and concurrently uploading
|
||||
-- of the content should still be allowed.
|
||||
alwaysUpload (uuid r) k af stdRetry $ \pm -> do
|
||||
let rollback = void $
|
||||
performUnexport r db [ek] loc
|
||||
sendAnnex k rollback $ \f ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue