summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();