summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-26 19:51:05 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-26 19:51:05 +0000
commite04794af4a9124c109dc1f3e3cc5eb772229070e (patch)
tree03672282e5375b9037cab2cf26bf54b76467342b /src/inspircd.cpp
parent8e7e59aa487e07ca63964379cc4c64189dbeef56 (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/inspircd.cpp')
-rw-r--r--src/inspircd.cpp6
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();