From: Manuel Nickschas Date: Tue, 29 May 2018 21:18:05 +0000 (+0200) Subject: common: Ensure the custom config path is stored as an absolute path X-Git-Tag: travis-deploy-test~71 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=4e3b9ea041c45aba5eaea14e4aafd46ee3ed044a;hp=27df512ce272d88cf85b854f6bfb3f1c7ba4a65c common: Ensure the custom config path is stored as an absolute path This prevents creation of a bogus and empty directory inside the custom config directory if the path given by --configdir was relative. --- diff --git a/src/common/quassel.cpp b/src/common/quassel.cpp index 7ee7915e..4e24ff0a 100644 --- a/src/common/quassel.cpp +++ b/src/common/quassel.cpp @@ -516,6 +516,8 @@ QString Quassel::configDirPath() #endif /* Q_OS_MAC */ } + path = QFileInfo{path}.absoluteFilePath(); + if (!path.endsWith(QDir::separator()) && !path.endsWith('/')) path += QDir::separator(); @@ -528,7 +530,6 @@ QString Quassel::configDirPath() } instance()->_configDirPath = path; - return path; }