Skip to content
Snippets Groups Projects

Resolves #343 GUI and Frame Refactor

Merged Nicolas Pope requested to merge feature/gui2 into master
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) {
string tail = "";
string head = "";
string uri = preprocessURI(puri);
size_t last_hash = uri.find_last_of('#');
if (last_hash != string::npos) {
//size_t last_hash = uri.find_last_of('/');
//if (last_hash != string::npos) {
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);
head = uri.substr(0, last);
} else {
tail = uri.substr(last_hash+1);
head = uri.substr(0, last_hash);
}
} else {
LOG(WARNING) << "Expected a # in an update URI: " << uri;
return false;
}
//} else {
// tail = uri.substr(last_hash+1);
// head = uri.substr(0, last_hash);
//}
//} else {
// LOG(WARNING) << "Expected a # in an update URI: " << uri;
// return false;
//}
Configurable *cfg = find(head);
Loading