aboutsummaryrefslogtreecommitdiffstats
path: root/common/project.cc
diff options
context:
space:
mode:
Diffstat (limited to 'common/project.cc')
-rw-r--r--common/project.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/project.cc b/common/project.cc
index b0ebe961..3b4e67e4 100644
--- a/common/project.cc
+++ b/common/project.cc
@@ -74,7 +74,7 @@ void ProjectHandler::save(Context *ctx, std::string filename)
std::string path = "project.settings.";
path += item.first.c_str(ctx);
std::replace(path.begin(), path.end(), '/', '.');
- root.put(path, item.second);
+ root.put(path, item.second.str);
}
pt::write_json(f, root);
} catch (...) {
@@ -88,7 +88,9 @@ void addSettings(Context *ctx, std::string path, pt::ptree sub)
const std::string &key = v.first;
const boost::property_tree::ptree &subtree = v.second;
if (subtree.empty()) {
- ctx->settings.emplace(ctx->id(path + key), subtree.get_value<std::string>().c_str());
+ Property p;
+ p.setString(subtree.get_value<std::string>().c_str());
+ ctx->settings.emplace(ctx->id(path + key), p);
} else {
addSettings(ctx, path + key + "/", subtree);
}