summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-16 22:10:50 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-16 22:22:24 +0300
commit6a10bc8d7d186fd83099c75c2a03409d0881aae9 (patch)
treed95c703390c73c1d1bc23359eb9de9d257a65090 /src/client.cpp
parent654285675ececa142877d86e6f730d040625fc6e (diff)
downloadplus-6a10bc8d7d186fd83099c75c2a03409d0881aae9.tar.gz
plus-6a10bc8d7d186fd83099c75c2a03409d0881aae9.tar.bz2
plus-6a10bc8d7d186fd83099c75c2a03409d0881aae9.tar.xz
plus-6a10bc8d7d186fd83099c75c2a03409d0881aae9.zip
Fix dataDir in branding files.
Move path functions to paths.cpp
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index be3d20373..ac6970503 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -91,6 +91,7 @@
#include "utils/gettext.h"
#include "utils/mkdir.h"
+#include "utils/paths.h"
#include "utils/stringutils.h"
#ifdef __APPLE__
@@ -363,8 +364,15 @@ Client::Client(const Options &options):
if (mOptions.dataPath.empty()
&& !branding.getStringValue("dataPath").empty())
{
- mOptions.dataPath = branding.getDirectory() + "/"
- + branding.getStringValue("dataPath");
+ if (isRealPath(branding.getStringValue("dataPath")))
+ {
+ mOptions.dataPath = branding.getStringValue("dataPath");
+ }
+ else
+ {
+ mOptions.dataPath = branding.getDirectory() + "/"
+ + branding.getStringValue("dataPath");
+ }
mOptions.skipUpdate = true;
}