check if tunnels.conf exists before open

This commit is contained in:
orignal
2026-01-13 19:10:38 -05:00
parent 2ad30e5776
commit 08bee4ed69
+5 -2
View File
@@ -547,8 +547,11 @@ namespace client
if (tunConf.empty ())
tunConf = i2p::fs::DataDirPath ("tunnels.conf");
LogPrint(eLogDebug, "Clients: Tunnels config file: ", tunConf);
ReadTunnels (tunConf, numClientTunnels, numServerTunnels);
if (i2p::fs::Exists (tunConf))
{
LogPrint(eLogDebug, "Clients: Tunnels config file: ", tunConf);
ReadTunnels (tunConf, numClientTunnels, numServerTunnels);
}
std::string tunDir; i2p::config::GetOption("tunnelsdir", tunDir);
if (tunDir.empty ())