Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. diff --git a/src/common/ConfigFileManager.cxx b/src/common/ConfigFileManager.cxx
  2. index 26b50e4..718b55e 100644
  3. --- a/src/common/ConfigFileManager.cxx
  4. +++ b/src/common/ConfigFileManager.cxx
  5. @@ -31,13 +31,13 @@ void writeBZDB(const std::string& name, void *stream)
  6. std::string newkey;
  7. bool commentOut = (value == defaultVal);
  8.  
  9. - // quotify anything with a space and empty strings
  10. - if ((value.find(' ') != value.npos) || (value.size() == 0)) {
  11. + // quotify empty strings and anything with a space or a semicolon
  12. + if ((value.find(' ') != value.npos) || (value.find(';') != value.npos) || (value.size() == 0)) {
  13. value = std::string("\"") + value + "\"";
  14. }
  15.  
  16. - // quotify the key if there's a space
  17. - if (name.find(' ') != name.npos)
  18. + // quotify the key if there's a space or a semicolon
  19. + if ((name.find(' ') != name.npos) || (name.find(';') != name.npos))
  20. newkey = std::string("\"") + name + "\"";
  21. else
  22. newkey = name;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement