summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-13 17:16:26 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-13 17:16:26 +0000
commit9f33bf7fc83cffccae96eb622bf39e8f4838b809 (patch)
tree248bbe5351c3d4eaee4f34589fc38a046204d151 /src/inspircd.cpp
parent25a78272bc44ae466ebb2e60e090e07dc1fe4f88 (diff)
Check for windows drive letters on the start of paths and treat them the same as paths that start with /, this makes insp more friendly for windows filesystems
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9724 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 97e2c77e3..50e76b2a2 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -351,7 +351,8 @@ bool InspIRCd::DaemonSeed()
void InspIRCd::WritePID(const std::string &filename)
{
std::string fname = (filename.empty() ? "inspircd.pid" : filename);
- if (*(fname.begin()) != '/')
+ std::replace(fname.begin(), fname.end(), '\\', '/');
+ if ((fname[0] != '/') && (!Config->StartsWithWindowsDriveLetter(filename)))
{
std::string::size_type pos;
std::string confpath = this->ConfigFileName;