[pve-devel] [PATCH container] fix #1618: do not double encode the description

Dominik Csapak d.csapak at proxmox.com
Tue Jan 16 15:43:18 CET 2018


we already encode the description in 'write_config',
we do not need to do it here again

this lead to newlines also to be encoded instead of
splitting the description into lines and decode that

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/PVE/LXC/Config.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 8d71f4a..0969862 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -958,7 +958,7 @@ sub update_pct_config {
 	    $conf->{$opt} = $value;
 	    PVE::LXC::write_cgroup_value("cpu", $vmid, "cpu.shares", $value);
 	} elsif ($opt eq 'description') {
-	    $conf->{$opt} = PVE::Tools::encode_text($value);
+	    $conf->{$opt} = $value;
 	} elsif ($opt =~ m/^net(\d+)$/) {
 	    my $netid = $1;
 	    my $net = PVE::LXC::Config->parse_lxc_network($value);
-- 
2.11.0





More information about the pve-devel mailing list