From 6a10bc8d7d186fd83099c75c2a03409d0881aae9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 16 Jun 2011 22:10:50 +0300 Subject: Fix dataDir in branding files. Move path functions to paths.cpp --- src/client.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/client.cpp') 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; } -- cgit v1.2.3-60-g2f50