summaryrefslogtreecommitdiff
path: root/client/Config.cpp
diff options
context:
space:
mode:
authorAlex <b0ris@b0ris-satellite.localdomain>2011-11-05 18:59:23 +0200
committerAlex <b0ris@b0ris-satellite.localdomain>2011-11-05 18:59:23 +0200
commitf1889d6c4b2c658177bfce08f41b6e1c337aec5e (patch)
tree0fd5f9ac03b685c4847f30f71daa68d000007245 /client/Config.cpp
parent2f71a1e82c20f4322ea0fb2994da251de58b366f (diff)
Fix file paths to be relative to app dir. Firewall config sample
Diffstat (limited to 'client/Config.cpp')
-rw-r--r--client/Config.cpp12
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;
}