]> git.proxmox.com Git - pve-common.git/commitdiff
do not merge comma separated lists with zero separated lists
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 12 Oct 2011 09:38:43 +0000 (11:38 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 12 Oct 2011 09:38:43 +0000 (11:38 +0200)
data/PVE/Tools.pm

index 5e8e7bf46460c1abfa5fd199e3bcca14c5176cbe..985b31ef4ec4a1523cda4e669846a719068cb0f1 100644 (file)
@@ -351,7 +351,9 @@ sub run_command {
 sub split_list {
     my $listtxt = shift || '';
 
 sub split_list {
     my $listtxt = shift || '';
 
-    $listtxt =~ s/[,;\0]/ /g;
+    return split (/\0/, $listtxt) if $listtxt =~ m/\0/;
+    
+    $listtxt =~ s/[,;]/ /g;
     $listtxt =~ s/^\s+//;
 
     my @data = split (/\s+/, $listtxt);
     $listtxt =~ s/^\s+//;
 
     my @data = split (/\s+/, $listtxt);