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
|
@ -8,7 +8,7 @@
|
|||
module Command.CalcKey where
|
||||
|
||||
import Command
|
||||
import Backend (genKey)
|
||||
import Backend (genKey, defaultBackend)
|
||||
import Types.KeySource
|
||||
import Utility.Metered
|
||||
|
||||
|
@ -21,7 +21,7 @@ cmd = noCommit $ noMessages $ dontCheck repoExists $
|
|||
(batchable run (pure ()))
|
||||
|
||||
run :: () -> SeekInput -> String -> Annex Bool
|
||||
run _ _ file = tryNonAsync (genKey ks nullMeterUpdate Nothing) >>= \case
|
||||
run _ _ file = tryNonAsync (genKey ks nullMeterUpdate =<< defaultBackend) >>= \case
|
||||
Right (k, _) -> do
|
||||
liftIO $ putStrLn $ serializeKey k
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue