[pve-devel] [PATCH common] Tools.pm: do not ignore "0" in split_list
Dominik Csapak
d.csapak at proxmox.com
Tue Nov 20 12:45:15 CET 2018
giving split_list the string "0" would actually return
an empty list instead of a list with the element "0"
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/PVE/Tools.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index 0f31fdb..accf653 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -640,7 +640,7 @@ sub pipe_socket_to_command {
}
sub split_list {
- my $listtxt = shift || '';
+ my $listtxt = shift // '';
return split (/\0/, $listtxt) if $listtxt =~ m/\0/;
--
2.11.0
More information about the pve-devel
mailing list