1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Unix: Use /tmp/qupzilla-$USER as temp path

It makes it possible to run QupZilla on more accounts at the same time
This commit is contained in:
David Rosca 2014-08-31 12:52:01 +02:00
parent 7a7be29e3a
commit 8b3da86976

View File

@ -143,8 +143,10 @@ void DataPaths::init()
// Temp
#ifdef Q_OS_UNIX
dir.mkpath(QDir::tempPath() + QLatin1String("/qupzilla/tmp"));
m_paths[Temp].append(QDir::tempPath() + QLatin1String("/qupzilla/tmp"));
const QByteArray &user = qgetenv("USER");
const QString &tempPath = QString(QSL("%1/qupzilla-%2/tmp")).arg(QDir::tempPath(), user.constData());
dir.mkpath(tempPath);
m_paths[Temp].append(tempPath);
#else
m_paths[Temp].append(m_paths[Config].first() + QLatin1String("/tmp"));
#endif