diff options
| author | 2007-07-26 19:51:58 +0000 | |
|---|---|---|
| committer | 2007-07-26 19:51:58 +0000 | |
| commit | 09b0dce174be83a0ef21149f486b4fac782b9fde (patch) | |
| tree | 80f8d55516d0a9e037460555e2a5d06ef8ad8074 /src/inspircd.cpp | |
| parent | Merge from trunk, eliminate warning when building with anal flags (diff) | |
Merge in error check from trunk, bail if we can't chdir to our own dir on startup
git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@7586 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
| -rw-r--r-- | src/inspircd.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 0e72fbe3c..9c11a6dd0 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -474,7 +474,11 @@ InspIRCd::InspIRCd(int argc, char** argv) this->Config->argv = argv; this->Config->argc = argc; - chdir(Config->GetFullProgDir().c_str()); + if (chdir(Config->GetFullProgDir().c_str())) + { + printf("Unable to change to my directory: %s\nAborted.", strerror(errno)); + exit(0); + } this->Config->opertypes.clear(); this->Config->operclass.clear(); |
