mirror of https://github.com/digint/btrbk
btrbk: use no-default-recipient on gpg encrypt
In case the user has set a default recipient in his gpg config file, ignore it.pull/485/head
parent
b824d62449
commit
a70248376f
5
btrbk
5
btrbk
|
@ -1750,8 +1750,9 @@ sub btrfs_send_to_file($$$;$$)
|
|||
my @gpg_options = ( '--batch', '--no-tty', '--no-random-seed-file', '--trust-model', 'always' );
|
||||
push @gpg_options, ( '--compress-algo', 'none' ) if($compress); # NOTE: if --compress-algo is not set, gpg might still compress according to OpenPGP standard.
|
||||
push(@gpg_options, ( '--no-default-keyring', '--keyring', { unsafe => $encrypt->{keyring} } )) if($encrypt->{keyring});
|
||||
foreach(@$encrypt->{recipient} // []) {
|
||||
push(@gpg_options, ('--recipient', $_));
|
||||
if($encrypt->{recipient}) {
|
||||
push(@gpg_options, '--no-default-recipient');
|
||||
push(@gpg_options, map +( '--recipient', $_ ), @{$encrypt->{recipient}});
|
||||
}
|
||||
push @cmd_pipe, {
|
||||
cmd => [ 'gpg', @gpg_options, '--encrypt' ],
|
||||
|
|
Loading…
Reference in New Issue