From a78d7311a64316a78358bfbb4e8e798778a9d7f7 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 4 Nov 2016 16:23:41 -0700 Subject: Fix network list API call. --- controller/JSONDB.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'controller/JSONDB.cpp') 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); } -- cgit v1.2.3