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