mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-04-29 01:06:13 +00:00
use file_copy instead of an unsafe cp call
This commit is contained in:
parent
5089350947
commit
b800197970
@ -222,11 +222,11 @@ sub assemble {
|
|||||||
$task->{cleanup}->{etc_vzdump} = 1;
|
$task->{cleanup}->{etc_vzdump} = 1;
|
||||||
|
|
||||||
mkpath "$dir/etc/vzdump/";
|
mkpath "$dir/etc/vzdump/";
|
||||||
$self->cmd ("cp '$conffile' '$dir/etc/vzdump/vps.conf'");
|
PVE::Tools::file_copy($conffile, "$dir/etc/vzdump/vps.conf");
|
||||||
my $cfgdir = dirname ($conffile);
|
my $cfgdir = dirname ($conffile);
|
||||||
foreach my $s (PVE::OpenVZ::SCRIPT_EXT) {
|
foreach my $s (PVE::OpenVZ::SCRIPT_EXT) {
|
||||||
my $fn = "$cfgdir/$vmid.$s";
|
my $fn = "$cfgdir/$vmid.$s";
|
||||||
$self->cmd ("cp '$fn' '$dir/etc/vzdump/vps.$s'") if -f $fn;
|
PVE::Tools::file_copy($fn, "$dir/etc/vzdump/vps.$s") if -f $fn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user