diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-26 19:51:05 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-26 19:51:05 +0000 |
commit | e04794af4a9124c109dc1f3e3cc5eb772229070e (patch) | |
tree | 03672282e5375b9037cab2cf26bf54b76467342b /src | |
parent | 8e7e59aa487e07ca63964379cc4c64189dbeef56 (diff) |
Abort if we cant chdir to our own dir (i'd say we have bigger things to worry about if this happens, but meh)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7585 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-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 35036afe9..c8125b078 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -421,7 +421,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(); |