Entries for empty lists were ignored when rewriting the configuration file. b=133179, r=timeless
git-svn-id: svn://10.0.0.236/trunk@117829 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
acf1b5d363
commit
ee040834e3
@ -89,7 +89,7 @@ sub Save {
|
||||
my %seen;
|
||||
foreach (@lines) {
|
||||
chomp;
|
||||
if (/^ *([^#;][^=\n\r]*)=(.*)$/os) {
|
||||
if (/^ *([^#;][^=\n\r]*)(?:=(.*))?$/os) {
|
||||
if (defined($$config{$1})) {
|
||||
unless ($seen{$1}) {
|
||||
my $value = $$config{$1};
|
||||
@ -135,7 +135,11 @@ sub Save {
|
||||
$seen{$1} = 1;
|
||||
} # else seen it already
|
||||
} else { # unknown
|
||||
print FILE "$1=$2\n";
|
||||
if (defined($2)) {
|
||||
print FILE "$1=$2\n";
|
||||
} else {
|
||||
print FILE "$1\n";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# might be a comment
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user