Skip to content
Snippets Groups Projects
Commit a4f71379 authored by Nick Draper's avatar Nick Draper
Browse files

re #5251 All properties are saved with \ instead of \

parent ac3ee8c2
No related branches found
No related tags found
No related merge requests found
...@@ -836,7 +836,8 @@ void ConfigServiceImpl::saveConfig(const std::string & filename) const ...@@ -836,7 +836,8 @@ void ConfigServiceImpl::saveConfig(const std::string & filename) const
else else
{ {
// If it does exist make sure the value is current // If it does exist make sure the value is current
const std::string value = getString(key, false); std::string value = getString(key, false);
Poco::replaceInPlace(value,"\\","\\\\"); //replace single \ with double
updated_file += key + "=" + value; updated_file += key + "=" + value;
//Remove the key from the changed key list //Remove the key from the changed key list
m_changed_keys.erase(key); m_changed_keys.erase(key);
...@@ -852,7 +853,9 @@ void ConfigServiceImpl::saveConfig(const std::string & filename) const ...@@ -852,7 +853,9 @@ void ConfigServiceImpl::saveConfig(const std::string & filename) const
for (std::set<std::string>::iterator key_itr = m_changed_keys.begin(); key_itr != key_end;) for (std::set<std::string>::iterator key_itr = m_changed_keys.begin(); key_itr != key_end;)
{ {
updated_file += *key_itr + "="; updated_file += *key_itr + "=";
updated_file += getString(*key_itr, false); std::string value = getString(*key_itr, false);
Poco::replaceInPlace(value,"\\","\\\\"); //replace single \ with double
updated_file += value;
if (++key_itr != key_end) if (++key_itr != key_end)
{ {
updated_file += "\n"; updated_file += "\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment