diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-28 23:20:31 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-28 23:20:31 +0000 |
commit | 664f69890abbad7962bf42c599417dd767a84297 (patch) | |
tree | f3905f7015d0e831110efb61223f7d7315cc0312 /src | |
parent | f9a0af279a418f6fa562545bca117533ff2e09ee (diff) |
Make this less confusing for us and users
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10746 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/helperfuncs.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 53529f539..9f3bca729 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -306,37 +306,7 @@ bool InspIRCd::OpenLog(char**, int) { if (Config->logpath.empty()) { - std::string path = std::string(home) + "/.inspircd"; - // This tries to create the ~/.inspircd. If it succeeds, then we go ahead and use it. - // If it fails due to an existing target, then we use it anyway. - // Either way, we make sure we can get write access to the log at this point. - if (!mkdir(path.c_str(), 0700) || errno == EEXIST) - { - /* Log to ~/.inspircd/ircd.log */ - Config->logpath = path + "/startup.log"; - FILE* fd = fopen(Config->logpath.c_str(), "a+"); - if (!fd) - { - // Could not get write access... Why? - if (errno == ENOTDIR) - // ~/.inspircd is not actually a directory! - printf("\nWARNING: Unable to create directory: %s (Exists and is not a directory)\n", path.c_str()); - else - // Not writable for some other reason (no +w access, readonly fs, file too big, whatever). - printf("\nWARNING: No write access to %s (%s)\n", Config->logpath.c_str(), strerror(errno)); - Config->logpath = "./startup.log"; - } - else - { - Config->log_file = fd; - } - } - else - { - /* Couldn't make ~/.inspircd directory, log to current dir */ - Config->logpath = "./startup.log"; - printf("\nWARNING: Unable to create directory: %s (%s)\n", path.c_str(), strerror(errno)); - } + Config->logpath = "./startup.log"; } if (!Config->log_file) |