Skip to content
Snippets Groups Projects
Commit 53f74c55 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Possible SDK fixes

parent ac529601
No related branches found
No related tags found
1 merge request!316Resolves #343 GUI and Frame Refactor
Pipeline #28534 failed
......@@ -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");
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment