summaryrefslogtreecommitdiffstats
path: root/src/libraries/qmfclient/support/qmailnamespace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libraries/qmfclient/support/qmailnamespace.cpp')
-rw-r--r--src/libraries/qmfclient/support/qmailnamespace.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libraries/qmfclient/support/qmailnamespace.cpp b/src/libraries/qmfclient/support/qmailnamespace.cpp
index 08a30e23..8efa64b6 100644
--- a/src/libraries/qmfclient/support/qmailnamespace.cpp
+++ b/src/libraries/qmfclient/support/qmailnamespace.cpp
@@ -105,12 +105,13 @@ QString QMail::dataPath()
QString path = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/qmf/";
- if (QDir(path).exists()) {
+ // path checks made with db subdirectory to check it's actually in use
+ if (QDir(path + QLatin1String("database")).exists()) {
cached = path;
} else {
// for backwards compatibility return the older data path if it exists and the new doesn't
QString oldPath = QDir::homePath() + QLatin1String("/.qmf/");
- cached = QDir(oldPath).exists() ? oldPath : path;
+ cached = QDir(oldPath + QLatin1String("database")).exists() ? oldPath : path;
}
return cached;