mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-06 21:04:18 +00:00
fix shell quoting
This commit is contained in:
parent
7454902f67
commit
4925fe8ec1
@ -3002,14 +3002,14 @@ sub restore_archive {
|
|||||||
|
|
||||||
my $tocmd = "/usr/lib/qemu-server/qmextract";
|
my $tocmd = "/usr/lib/qemu-server/qmextract";
|
||||||
|
|
||||||
$tocmd .= " --storage $opts->{storage}" if $opts->{storage};
|
$tocmd .= " --storage " . shellquote($opts->{storage}) if $opts->{storage};
|
||||||
$tocmd .= ' --prealloc' if $opts->{prealloc};
|
$tocmd .= ' --prealloc' if $opts->{prealloc};
|
||||||
$tocmd .= ' --info' if $opts->{info};
|
$tocmd .= ' --info' if $opts->{info};
|
||||||
|
|
||||||
# tar option "xf" does not autodetect compression when read fron STDIN,
|
# tar option "xf" does not autodetect compression when read fron STDIN,
|
||||||
# so we pipe to zcat
|
# so we pipe to zcat
|
||||||
my $cmd = "zcat -f|tar xf " . shellquote($archive) . " --to-command" .
|
my $cmd = "zcat -f|tar xf " . shellquote($archive) . " " .
|
||||||
shellquote($tocmd);
|
shellquote("--to-command=$tocmd");
|
||||||
|
|
||||||
my $tmpdir = "/var/tmp/vzdumptmp$$";
|
my $tmpdir = "/var/tmp/vzdumptmp$$";
|
||||||
mkpath $tmpdir;
|
mkpath $tmpdir;
|
||||||
|
Loading…
Reference in New Issue
Block a user