aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-05-18 20:07:36 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-05-18 20:07:36 +0000
commit7e6f88adeab001ec4bfd8cc02742693f22f6e7ca (patch)
tree85ec0068e27726e90ae174d1ca27f5d7ebb9994c
parent74cf96d73cee6d681e7af6de37f058ac2f218487 (diff)
downloadpaludis-7e6f88adeab001ec4bfd8cc02742693f22f6e7ca.tar.gz
paludis-7e6f88adeab001ec4bfd8cc02742693f22f6e7ca.tar.xz
Treat carriage returns as whitespace for KeyValueConfigFile.
-rw-r--r--paludis/util/config_file.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/paludis/util/config_file.cc b/paludis/util/config_file.cc
index 16de643..29e41cd 100644
--- a/paludis/util/config_file.cc
+++ b/paludis/util/config_file.cc
@@ -579,7 +579,7 @@ namespace
++c;
break;
}
- else if (*c == ' ' || *c == '\t')
+ else if (*c == ' ' || *c == '\t' || *c == '\r')
{
if (opts[kvcfo_disallow_space_inside_unquoted_values])
throw ConfigFileError(f, "Extra or trailing whitespace in value");
@@ -596,7 +596,7 @@ namespace
}
if (! opts[kvcfo_preserve_whitespace])
- result = strip_leading(strip_trailing(result, " \t"), " \t");
+ result = strip_leading(strip_trailing(result, " \t\r"), " \t\r");
return result;
}