Create directory for storing p2p config if it doesn't already exist
This commit is contained in:
parent
11b357494b
commit
37cadb2be8
1 changed files with 4 additions and 0 deletions
|
|
@ -113,8 +113,12 @@ namespace graphene { namespace net {
|
|||
std::vector<potential_peer_record> peer_records;
|
||||
peer_records.reserve(_potential_peer_set.size());
|
||||
std::copy(_potential_peer_set.begin(), _potential_peer_set.end(), std::back_inserter(peer_records));
|
||||
|
||||
try
|
||||
{
|
||||
fc::path peer_database_filename_dir = _peer_database_filename.parent_path();
|
||||
if (!fc::exists(peer_database_filename_dir))
|
||||
fc::create_directories(peer_database_filename_dir);
|
||||
fc::json::save_to_file(peer_records, _peer_database_filename);
|
||||
}
|
||||
catch (const fc::exception& e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue