summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-07-03 09:59:46 +0100
committerPeter Powell <petpow@saberuk.com>2019-07-03 10:00:51 +0100
commitce6c5fc3de38ab42173d85c3c91bb2ac34a0f792 (patch)
treedd6c97691b6411a46cdf20c5cde29fbac567b92b /src
parentfa0ee25eaf4c9bd6c5f3656c30ce1f69653a3132 (diff)
Fix not expanding <pid:file> correctly.
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 29cd8acf2..70e5fcf38 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -190,9 +190,7 @@ void InspIRCd::WritePID(const std::string& filename, bool exitonfail)
return;
}
- std::string fname(filename);
- if (fname.empty())
- fname = ServerInstance->Config->Paths.PrependData("inspircd.pid");
+ std::string fname = ServerInstance->Config->Paths.PrependData(filename.empty() ? "inspircd.pid" : filename);
std::ofstream outfile(fname.c_str());
if (outfile.is_open())
{