diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index ab5a9e191..8ebdc3b58 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -294,7 +294,16 @@ InspIRCd::InspIRCd(int argc, char** argv) : { case 'c': /* Config filename was set */ - ConfigFileName = ServerInstance->Config->Paths.PrependConfig(optarg); + ConfigFileName = optarg; +#ifdef _WIN32 + TCHAR configPath[MAX_PATH + 1]; + if (GetFullPathName(optarg, MAX_PATH, configPath, NULL) > 0) + ConfigFileName = configPath; +#else + char configPath[PATH_MAX + 1]; + if (realpath(optarg, configPath)) + ConfigFileName = configPath; +#endif break; case 0: /* getopt_long_only() set an int variable, just keep going */ |