add unlocked flag for git-annex-shell recvkey
The direct flag is also set when sending unlocked content, to support old versions of git-annex-shell. At some point, the direct flag will be removed, and only the unlocked flag will be used.
This commit is contained in:
parent
f324ad24c1
commit
f776ac0a11
5 changed files with 14 additions and 6 deletions
|
@ -27,10 +27,11 @@ seek = withKeys start
|
|||
|
||||
start :: Key -> CommandStart
|
||||
start key = fieldTransfer Download key $ \_p -> do
|
||||
-- Always verify content when a direct mode repo is sending a file,
|
||||
-- Always verify content when a repo is sending an unlocked file,
|
||||
-- as the file could change while being transferred.
|
||||
fromdirect <- isJust <$> Fields.getField Fields.direct
|
||||
let verify = if fromdirect then AlwaysVerify else DefaultVerify
|
||||
fromunlocked <- (isJust <$> Fields.getField Fields.unlocked)
|
||||
<||> (isJust <$> Fields.getField Fields.direct)
|
||||
let verify = if fromunlocked then AlwaysVerify else DefaultVerify
|
||||
ifM (getViaTmp verify key go)
|
||||
( do
|
||||
-- forcibly quit after receiving one key,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue