From 4e3b9ea041c45aba5eaea14e4aafd46ee3ed044a Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Tue, 29 May 2018 23:18:05 +0200 Subject: [PATCH] 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. --- src/common/quassel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.20.1