From 156a14dfb6600f35da37bec9cf11b5da1d1a6b06 Mon Sep 17 00:00:00 2001 From: nowrep Date: Thu, 13 Feb 2014 19:24:12 +0100 Subject: [PATCH] [Windows] Use %LOCALAPPDATA% only if user doesn't have config in older paths --- src/lib/app/mainapplication.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 9d2d28396..1dd939473 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -212,10 +212,16 @@ MainApplication::MainApplication(int &argc, char** argv) } QDir confPath = QDir(dataLocation); + + QDir homePath = QDir(QDir::homePath() + QLatin1String("/.qupzilla/")); + + if (!homePath.exists()) { + homePath = QDir::homePath() + QLatin1String("/.config/qupzilla/"); + } #else // Unix QDir confPath = QDir(QDir::homePath() + QLatin1String("/.config/qupzilla/")); -#endif QDir homePath = QDir(QDir::homePath() + QLatin1String("/.qupzilla/")); +#endif if (homePath.exists() && !confPath.exists()) { PROFILEDIR = homePath.absolutePath() + QLatin1Char('/');