Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/common/ConfigFileManager.cxx b/src/common/ConfigFileManager.cxx
- index 26b50e4..718b55e 100644
- --- a/src/common/ConfigFileManager.cxx
- +++ b/src/common/ConfigFileManager.cxx
- @@ -31,13 +31,13 @@ void writeBZDB(const std::string& name, void *stream)
- std::string newkey;
- bool commentOut = (value == defaultVal);
- - // quotify anything with a space and empty strings
- - if ((value.find(' ') != value.npos) || (value.size() == 0)) {
- + // quotify empty strings and anything with a space or a semicolon
- + if ((value.find(' ') != value.npos) || (value.find(';') != value.npos) || (value.size() == 0)) {
- value = std::string("\"") + value + "\"";
- }
- - // quotify the key if there's a space
- - if (name.find(' ') != name.npos)
- + // quotify the key if there's a space or a semicolon
- + if ((name.find(' ') != name.npos) || (name.find(';') != name.npos))
- newkey = std::string("\"") + name + "\"";
- else
- newkey = name;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement