]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Use !empty() instead of 'size() > 0' when checking parameter count.
[user/henk/code/inspircd.git] / src / inspircd.cpp
index ab5a9e1918311362e4b2a79a48b7d3cc5a844122..8ebdc3b58958bcf8c2a2fd5dc69c6f4bcea829d0 100644 (file)
@@ -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 */