Commit f9e4397d authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Fix log file path on Windows

parent e08660af
......@@ -29,6 +29,7 @@
#include <QDir>
#include <QTest>
#include <QBuffer>
#include <QStandardPaths>
#include <private/xdgbasedirs_p.h>
#include <private/protocol_p.h>
......@@ -130,7 +131,8 @@ FakeAkonadiServer::~FakeAkonadiServer()
QString FakeAkonadiServer::basePath()
{
return QStringLiteral("/tmp/akonadiserver-test-%1").arg(QCoreApplication::instance()->applicationPid());
return QStandardPaths::writableLocation(QStandardPaths::TempLocation)
+ QStringLiteral("/akonadiserver-test-%1").arg(QCoreApplication::instance()->applicationPid());
}
QString FakeAkonadiServer::socketFile()
......
......@@ -129,7 +129,7 @@ public:
void setName(const QString &appName)
{
// Keep only the executable name, e.g. akonadi_control
name = appName.mid(appName.lastIndexOf(QLatin1Char('/')) + 1);
name = appName.mid(appName.lastIndexOf(QDir::separator()) + 1);
if (file.isOpen()) {
file.close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment