btrbk: do not set "--compress-algo none" on gpg command if raw_target_compress=no

Note that gpg might still compress (according to OpenPGP standard) if
--compress-algo is not set. This is generally a good thing.
pull/106/merge
Axel Burri 2016-08-24 16:13:33 +02:00
parent b0feaf4413
commit 3dabb507e6
1 changed files with 2 additions and 1 deletions

3
btrbk
View File

@ -1268,7 +1268,8 @@ sub btrfs_send_to_file($$$$;@)
if($opts{encrypt}) {
die unless($opts{encrypt}->{type} eq "gpg");
$target_filename .= '.gpg';
my @gpg_options = ( '--batch', '--no-tty', '--trust-model', 'always', '--compress-algo', 'none' );
my @gpg_options = ( '--batch', '--no-tty', '--trust-model', 'always' );
push @gpg_options, ( '--compress-algo', 'none' ) if($opts{compress}); # NOTE: if --compress-algo is not set, gpg might still compress according to OpenPGP standard.
push(@gpg_options, ( '--no-default-keyring', '--keyring', $opts{encrypt}->{keyring} )) if($opts{encrypt}->{keyring});
push(@gpg_options, ( '--default-recipient', $opts{encrypt}->{recipient} )) if($opts{encrypt}->{recipient});
push @cmd_pipe, {