miner: do not try to save config if the path isn't set

This saves on an exception dump when trying to write to /
after finding a block.
This commit is contained in:
moneromooo-monero 2016-09-18 09:57:42 +01:00
parent 77224bbf48
commit e86c5b9b53
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 2 additions and 1 deletions

View File

@ -391,7 +391,8 @@ namespace cryptonote
}else
{
//success update, lets update config
epee::serialization::store_t_to_json_file(m_config, m_config_folder_path + "/" + MINER_CONFIG_FILE_NAME);
if (!m_config_folder_path.empty())
epee::serialization::store_t_to_json_file(m_config, m_config_folder_path + "/" + MINER_CONFIG_FILE_NAME);
}
}
nonce+=m_threads_total;