From 9f33bf7fc83cffccae96eb622bf39e8f4838b809 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 13 May 2008 17:16:26 +0000 Subject: 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 --- src/inspircd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/inspircd.cpp') 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; -- cgit v1.3.1-10-gc9f91