bugfixes
This commit is contained in:
parent
770116a6ab
commit
f1b94d3d84
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required (VERSION 3.7)
|
||||
project (mastobotmon
|
||||
VERSION 0.3.8
|
||||
VERSION 0.3.9
|
||||
LANGUAGES CXX)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
|
|
@ -40,8 +40,9 @@ const bool read_config()
|
|||
{
|
||||
json << file.rdbuf();
|
||||
file.close();
|
||||
json >> config;
|
||||
|
||||
if (json >> config)
|
||||
if (!config.isObject())
|
||||
{
|
||||
cerr << "ERROR: couldn't parse config file. Are you sure the JSON is well-formed?\n";
|
||||
return false;
|
||||
|
|
|
@ -97,8 +97,8 @@ const bool write_statistics(const string &straccount, Easy::Account &account_ent
|
|||
|
||||
ss << std::put_time(&now_tm, "%Y-%m-%dT%T");
|
||||
output = ss.str() + ';';
|
||||
output += account_entity.statuses_count() + ';';
|
||||
output += account_entity.followers_count() + '\n';
|
||||
output += std::to_string(account_entity.statuses_count()) + ';';
|
||||
output += std::to_string(account_entity.followers_count()) + '\n';
|
||||
outfile.write(output.c_str(), output.length());
|
||||
outfile.close();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user