avoid failure to lock content of removed file causing drop etc to fail
This was already prevented in other ways, but as seen in commit
c30fd24d91
, those were a bit fragile.
And I'm not sure races were avoided in every case before. At least a
race between two separate git-annex processes, dropping the same
content, seemed possible.
This way, if locking fails, and the content is not present, it will
always do the right thing. Also, it avoids the overhead of an unncessary
inAnnex check for every file.
This commit was sponsored by Denis Dzyubenko on Patreon.
This commit is contained in:
parent
c30fd24d91
commit
2a45b5ae9a
11 changed files with 65 additions and 40 deletions
|
@ -99,7 +99,7 @@ startDistributionDownload d = go =<< liftIO . newVersionLocation d =<< liftIO ol
|
|||
, transferKeyData = fromKey id k
|
||||
}
|
||||
cleanup = liftAnnex $ do
|
||||
lockContentForRemoval k removeAnnex
|
||||
lockContentForRemoval k noop removeAnnex
|
||||
setUrlMissing k u
|
||||
logStatus k InfoMissing
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue