diff --git a/SDK/C/src/streams.cpp b/SDK/C/src/streams.cpp index 55eec9805b16c15ebb59accf602decf00c02a65a..e2a48c9bf2eaa5c35f3f0d2a017464e532dcef15 100644 --- a/SDK/C/src/streams.cpp +++ b/SDK/C/src/streams.cpp @@ -42,7 +42,7 @@ static void createFileWriteStream(FTLStream *s, const ftl::URI &uri) { if (!root) { int argc = 1; const char *argv[] = {"SDK",0}; - root = ftl::configure(argc, const_cast<char**>(argv), "sdk_default"); + root = ftl::configure(argc, const_cast<char**>(argv), "sdk_default", {}); } auto *fs = ftl::create<ftl::stream::File>(root, "ftlfile"); diff --git a/components/common/cpp/src/configuration.cpp b/components/common/cpp/src/configuration.cpp index 3a0fce37e2ee7c46d26569ed0fd58d3d68c463a6..522ce44bd0a73362d4f8b5ba9e91d61f124a2231 100644 --- a/components/common/cpp/src/configuration.cpp +++ b/components/common/cpp/src/configuration.cpp @@ -388,13 +388,15 @@ bool ftl::config::update(const std::string &puri, const json_t &value) { //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) { tail = uri.substr(last+1); head = uri.substr(0, last); - //} else { + } else { // tail = uri.substr(last_hash+1); // head = uri.substr(0, last_hash); - //} + LOG(WARNING) << "Expected a URI path: " << uri; + return false; + } //} else { // LOG(WARNING) << "Expected a # in an update URI: " << uri; // return false; @@ -605,6 +607,7 @@ map<string, string> ftl::config::read_options(char ***argv, int *argc) { */ static void process_options(Configurable *root, const map<string, string> &opts) { for (auto opt : opts) { + if (opt.first == "") continue; if (opt.first == "config") continue; if (opt.first == "root") continue;