mirror of
https://github.com/anope/anope.git
synced 2026-06-26 17:36:38 +02:00
Use paths relative to data/conf in the config file.
This was done in some places already but not consistently. Closes #349.
This commit is contained in:
+4
-1
@@ -218,7 +218,10 @@ static void remove_pidfile()
|
||||
|
||||
static void write_pidfile()
|
||||
{
|
||||
const auto pidfile = Config->GetBlock("serverinfo")->Get<const Anope::string>("pid");
|
||||
auto pidfile = Anope::ExpandData(Config->GetBlock("serverinfo")->Get<const Anope::string>("pid"));
|
||||
if (pidfile.empty())
|
||||
return;
|
||||
|
||||
std::ofstream stream(pidfile.str());
|
||||
if (!stream.is_open())
|
||||
throw CoreException("Can not write to PID file " + pidfile);
|
||||
|
||||
Reference in New Issue
Block a user