Browse Source

create addressbook before etags

pull/420/head
orignal 9 years ago
parent
commit
1036ce0fa5
  1. 8
      AddressBook.cpp

8
AddressBook.cpp

@ -49,6 +49,9 @@ namespace client
bool AddressBookFilesystemStorage::Init() bool AddressBookFilesystemStorage::Init()
{ {
storage.SetPlace(i2p::fs::GetDataDir()); storage.SetPlace(i2p::fs::GetDataDir());
// init storage
if (storage.Init(i2p::data::GetBase32SubstitutionTable(), 32))
{
// init ETags // init ETags
etagsPath = i2p::fs::StorageRootPath (storage, "etags"); etagsPath = i2p::fs::StorageRootPath (storage, "etags");
if (!i2p::fs::Exists (etagsPath)) if (!i2p::fs::Exists (etagsPath))
@ -56,8 +59,9 @@ namespace client
// init address files // init address files
indexPath = i2p::fs::StorageRootPath (storage, "addresses.csv"); indexPath = i2p::fs::StorageRootPath (storage, "addresses.csv");
localPath = i2p::fs::StorageRootPath (storage, "local.csv"); localPath = i2p::fs::StorageRootPath (storage, "local.csv");
// init storage return true;
return storage.Init(i2p::data::GetBase32SubstitutionTable(), 32); }
return false;
} }
std::shared_ptr<const i2p::data::IdentityEx> AddressBookFilesystemStorage::GetAddress (const i2p::data::IdentHash& ident) const std::shared_ptr<const i2p::data::IdentityEx> AddressBookFilesystemStorage::GetAddress (const i2p::data::IdentHash& ident) const

Loading…
Cancel
Save