summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-03 21:36:17 +0000
committeraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-03 21:36:17 +0000
commit907b61918ff304708892b756ce62891c5435877a (patch)
tree923a44cb664f204c6cdd02abc6412c97769b54f2
parent86dd9fa5ea02644096f3529a6cbf3a55b5bb1d60 (diff)
Make creation of ~/.inspircd properly check for EEXIST
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9605 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/helperfuncs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index b0c966457..d0bffc7dc 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -308,7 +308,7 @@ bool InspIRCd::OpenLog(char**, int)
if (Config->logpath.empty())
{
std::string path = std::string(home) + "/.inspircd";
- if (!mkdir(path.c_str(), 0700) && errno != EEXIST)
+ if (!mkdir(path.c_str(), 0700) || errno == EEXIST)
{
/* Log to ~/.inspircd/ircd.log */
Config->logpath = path + "/startup.log";