addurl, importfeed: Fix failure when annex.securehashesonly is set
The temporary URL key used for the download, before the real key is generated, was blocked by annex.securehashesonly. Fixed by passing the Backend that will be used for the final key into runTransfer. When a Backend is provided, have preCheckSecureHashes check that, rather than the key being transferred. Sponsored-by: unqueued on Patreon
This commit is contained in:
parent
d4cb7afeed
commit
24ae4b291c
11 changed files with 79 additions and 65 deletions
|
@ -56,8 +56,7 @@ start o si file key = do
|
|||
Nothing -> stop
|
||||
Just oldbackend -> do
|
||||
exists <- inAnnex key
|
||||
newbackend <- maybe defaultBackend return
|
||||
=<< chooseBackend file
|
||||
newbackend <- chooseBackend file
|
||||
if (newbackend /= oldbackend || upgradableKey oldbackend key || forced) && exists
|
||||
then go False oldbackend newbackend
|
||||
else if removeSize o && exists
|
||||
|
@ -116,7 +115,7 @@ perform onlyremovesize o file oldkey oldbackend newbackend = go =<< genkey (fast
|
|||
, contentLocation = content
|
||||
, inodeCache = Nothing
|
||||
}
|
||||
newkey <- fst <$> genKey source nullMeterUpdate (Just newbackend)
|
||||
newkey <- fst <$> genKey source nullMeterUpdate newbackend
|
||||
return $ Just (newkey, False)
|
||||
genkey (Just fm) = fm oldkey newbackend afile >>= \case
|
||||
Just newkey -> return (Just (newkey, True))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue