Make tunnels.cfg configurable

This commit is contained in:
Edward Tjörnhammar 2015-08-11 23:19:25 +02:00
parent 14c5753261
commit 3d489a2996
5 changed files with 18 additions and 4 deletions

View file

@ -185,6 +185,14 @@ namespace filesystem
return pathConfigFile;
}
boost::filesystem::path GetTunnelsConfigFile()
{
boost::filesystem::path pathTunnelsConfigFile(i2p::util::config::GetArg("-tunnelscfg", "tunnels.cfg"));
if(!pathTunnelsConfigFile.is_complete())
pathTunnelsConfigFile = GetDataDir() / pathTunnelsConfigFile;
return pathTunnelsConfigFile;
}
boost::filesystem::path GetDefaultDataDir()
{
// Windows < Vista: C:\Documents and Settings\Username\Application Data\i2pd

View file

@ -70,6 +70,11 @@ namespace util
*/
boost::filesystem::path GetConfigFile();
/**
* @return the path of the tunnels configuration file
*/
boost::filesystem::path GetTunnelsConfigFile();
/**
* @return the default directory for i2pd data
*/