- Fix attributes with no values.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2159 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Mark Buechler
2010-09-22 17:30:52 +00:00
parent ab505854c1
commit 20cdd97fc9

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}}) {