summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-02 13:45:39 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-02 13:45:39 +0000
commit0c73dcfdb1949735dd24b6ddb76499fc36fc6d91 (patch)
tree408e31e24a1bf76ae141d507da5bd585a439b248
parent920f61414e4eedba33a75fd4c941c06bf17f26a9 (diff)
Debug to troubleshoot why this writes the log to the current dir in bsd, not the bin dir where it should
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7210 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/configreader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 11fd7f8c7..1d027ae93 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -1629,16 +1629,19 @@ std::string ServerConfig::GetFullProgDir()
// Get the current working directory
if (getcwd(buffer, PATH_MAX))
{
+ ServerInstance->Log(DEBUG,"getcwd='%s', argv[0]='%s'", buffer, this->argv[0]);
std::string remainder = this->argv[0];
/* Does argv[0] start with /? its a full path, use it */
if (remainder[0] == '/')
{
+ ServerInstance->Log(DEBUG,"argv starts with slash, using for full path.");
std::string::size_type n = remainder.rfind("/inspircd");
return std::string(remainder, 0, n);
}
std::string fullpath = std::string(buffer) + "/" + remainder;
+ ServerInstance->Log(DEBUG,"Using concatenation: %s", fullpath.c_str());
std::string::size_type n = fullpath.rfind("/inspircd");
return std::string(fullpath, 0, n);
}