Skip to content
Snippets Groups Projects

Resolves #343 GUI and Frame Refactor

1 file
+ 11
11
Compare changes
  • Side-by-side
  • Inline
@@ -385,20 +385,20 @@ bool ftl::config::update(const std::string &puri, const json_t &value) {
@@ -385,20 +385,20 @@ bool ftl::config::update(const std::string &puri, const json_t &value) {
string tail = "";
string tail = "";
string head = "";
string head = "";
string uri = preprocessURI(puri);
string uri = preprocessURI(puri);
size_t last_hash = uri.find_last_of('#');
//size_t last_hash = uri.find_last_of('/');
if (last_hash != string::npos) {
//if (last_hash != string::npos) {
size_t last = uri.find_last_of('/');
size_t last = uri.find_last_of('/');
if (last != string::npos && last > last_hash) {
//if (last != string::npos && last > last_hash) {
tail = uri.substr(last+1);
tail = uri.substr(last+1);
head = uri.substr(0, last);
head = uri.substr(0, last);
} else {
//} else {
tail = uri.substr(last_hash+1);
// tail = uri.substr(last_hash+1);
head = uri.substr(0, last_hash);
// head = uri.substr(0, last_hash);
}
//}
} else {
//} else {
LOG(WARNING) << "Expected a # in an update URI: " << uri;
// LOG(WARNING) << "Expected a # in an update URI: " << uri;
return false;
// return false;
}
//}
Configurable *cfg = find(head);
Configurable *cfg = find(head);
Loading