add certsdir option ()

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2021-06-18 06:38:10 +03:00
parent 2185019b59
commit 5bfab0a796
No known key found for this signature in database
GPG key ID: 66F6C87B98EBCFE2
4 changed files with 21 additions and 2 deletions
libi2pd

View file

@ -98,7 +98,14 @@ namespace data
void Families::LoadCertificates ()
{
std::string certDir = i2p::fs::DataDirPath("certificates", "family");
std::string certDir;
std::string certsdir; i2p::config::GetOption("certsdir", certsdir);
if (!i2p::config::IsDefault("certsdir"))
certDir = certsdir + i2p::fs::dirSep + "family";
if (certDir.empty() || !i2p::fs::Exists(certDir))
std::string certDir = i2p::fs::DataDirPath("certificates", "family");
std::vector<std::string> files;
int numCertificates = 0;