mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-04 00:59:32 +02:00
Dont try to parse empty settings.json
This commit is contained in:
parent
0168bb17ab
commit
8d715e6bfc
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ void Config::init(const std::string& root_directory, const std::string& user, co
|
|||
try
|
||||
{
|
||||
ifstream ifs(filename_, std::ifstream::in);
|
||||
if (ifs.good())
|
||||
if ((ifs.good()) && (ifs.peek() != std::ifstream::traits_type::eof()))
|
||||
{
|
||||
json j;
|
||||
ifs >> j;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue