diff options
Diffstat (limited to 'client/Config.cpp')
-rwxr-xr-x | client/Config.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/client/Config.cpp b/client/Config.cpp index 8df5fa0..f7b30cd 100755 --- a/client/Config.cpp +++ b/client/Config.cpp @@ -236,10 +236,13 @@ unsigned Config::GetStaticProxyGuiLines() int Config::ReadGenericProxy() { Logger::Info("Parsing generic proxy list\n"); - ifstream proxyFile(QString(this_app->applicationDirPath()+"./config/proxy_list.cfg").toUtf8().data(), 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; } @@ -264,10 +267,12 @@ int Config::ReadStaticProxy() { Logger::Info("Parsing static proxy list\n"); - ifstream proxyFile(QString(this_app->applicationDirPath() + "./config/static_proxy_list.cfg").toUtf8().data(), 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; } |