* rename tunnels.conf -> tunnels.conf, add detection of old config

This commit is contained in:
hagen 2016-03-28 00:00:00 +00:00
parent 8437d45866
commit e6dbeda18e
5 changed files with 14 additions and 7 deletions

View file

@ -261,8 +261,15 @@ namespace client
{
boost::property_tree::ptree pt;
std::string tunConf; i2p::config::GetOption("tunconf", tunConf);
if (tunConf == "")
if (tunConf == "") {
// TODO: cleanup this in 2.8.0
tunConf = i2p::fs::DataDirPath ("tunnels.cfg");
if (i2p::fs::Exists(tunConf)) {
LogPrint(eLogWarning, "FS: please rename tunnels.cfg -> tunnels.conf here: ", tunConf);
} else {
tunConf = i2p::fs::DataDirPath ("tunnels.conf");
}
}
LogPrint(eLogDebug, "FS: tunnels config file: ", tunConf);
try
{