diff options
Diffstat (limited to 'client/Config.cpp')
-rw-r--r-- | client/Config.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/client/Config.cpp b/client/Config.cpp index ee8b9da..8ba72d0 100644 --- a/client/Config.cpp +++ b/client/Config.cpp @@ -237,10 +237,12 @@ int Config::ReadGenericProxy() { Logger::Info("Parsing generic proxy list\n"); - ifstream proxyFile("./config/proxy_list.cfg", std::ios::in); + string filname = QCoreApplication::applicationDirPath().toStdString() + + "/config/proxy_list.cfg"; + ifstream proxyFile(filname.c_str(), std::ios::in); if (!proxyFile) { - Logger::Error("Can't open file ./config/proxy_list.cfg"); + Logger::Error("Can't open file %s\n", filname.c_str()); return -1; } @@ -265,10 +267,12 @@ int Config::ReadStaticProxy() { Logger::Info("Parsing static proxy list\n"); - ifstream proxyFile("./config/static_proxy_list.cfg", std::ios::in); + string filename = QCoreApplication::applicationDirPath().toStdString() + + "/config/static_proxy_list.cfg"; + ifstream proxyFile(filename.c_str(), std::ios::in); if (!proxyFile) { - Logger::Error("Can't open file ./config/static_proxy_list.cfg\n"); + Logger::Error("Can't open file %s\n", filename.c_str()); return -1; } |