GitHub issue #460

This commit is contained in:
Adam Ierymenko 2017-03-17 18:19:51 -07:00
parent e10325e133
commit 4f3f471b4c
5 changed files with 13 additions and 67 deletions

View file

@ -45,13 +45,13 @@ public:
JSONDB(const std::string &basePath) :
_basePath(basePath)
{
_reload(_basePath);
_reload(_basePath,std::string());
}
inline void reload()
{
_db.clear();
_reload(_basePath);
_reload(_basePath,std::string());
}
bool writeRaw(const std::string &n,const std::string &obj);
@ -95,7 +95,7 @@ public:
inline bool operator!=(const JSONDB &db) const { return (!(*this == db)); }
private:
void _reload(const std::string &p);
void _reload(const std::string &p,const std::string &b);
bool _isValidObjectName(const std::string &n);
std::string _genPath(const std::string &n,bool create);