diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-11-04 16:23:41 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-11-04 16:23:41 -0700 |
| commit | a78d7311a64316a78358bfbb4e8e798778a9d7f7 (patch) | |
| tree | c412b3a4b961aae567bac2b5abb4c7c62b0b0b6b /controller/JSONDB.cpp | |
| parent | 08ff666e999376a903b7e7fdc0ba47de2a929bcd (diff) | |
| download | infinitytier-a78d7311a64316a78358bfbb4e8e798778a9d7f7.tar.gz infinitytier-a78d7311a64316a78358bfbb4e8e798778a9d7f7.zip | |
Fix network list API call.
Diffstat (limited to 'controller/JSONDB.cpp')
| -rw-r--r-- | controller/JSONDB.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/controller/JSONDB.cpp b/controller/JSONDB.cpp index 59110f25..506fc425 100644 --- a/controller/JSONDB.cpp +++ b/controller/JSONDB.cpp @@ -119,7 +119,9 @@ void JSONDB::_reload(const std::string &p) if (ZT_PATH_SEPARATOR != '/') std::replace(n.begin(),n.end(),ZT_PATH_SEPARATOR,'/'); if ((n.length() > 0)&&(n[n.length() - 1] != '/')) n.push_back('/'); n.append(li->first); - this->get(n,0); // causes load and cache or update + if ((n.length() > 5)&&(n.substr(n.length() - 5) == ".json")) { + this->get(n.substr(0,n.length() - 5),0); // causes load and cache or update + } } else if (li->second == 'd') { this->_reload(p + ZT_PATH_SEPARATOR + li->first); } |
