- Fix for attributes without values from trunk.

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@2165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Mark Buechler
2010-09-22 17:57:47 +00:00
parent 18ac63d958
commit f0e023fb4d

View File

@@ -4184,10 +4184,11 @@ sub configToAttr {
my %attributes;
foreach my $attr (keys %{$config}) {
if ((keys %{$$config{$attr}}) > 1) {
if (!scalar keys %{$$config{$attr}}) {
$attributes{$attr} = '';
} elsif ((keys %{$$config{$attr}}) > 1) {
foreach my $value (keys %{$$config{$attr}}) {
push @{$attributes{$attr}}, $value if (defined($value) &&
($value ne ''));
push @{$attributes{$attr}}, $value;
}
} else {
foreach my $value (keys %{$$config{$attr}}) {