From 61b98a620f0e5aa2e3998d6b606b9a4e660bcfda Mon Sep 17 00:00:00 2001 From: Dman95 Date: Mon, 13 Feb 2023 14:50:06 +0300 Subject: [PATCH] Fix building on Windows for non-latin usernames. --- common.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common.cpp b/common.cpp index 8e4f6485..03cd4e18 100644 --- a/common.cpp +++ b/common.cpp @@ -81,7 +81,11 @@ QString Common::applicationDataPath() QString Common::pathInTemp(QString path) { - QString temp = QDir::tempPath(); + #ifdef Q_OS_WIN32 + QString temp = qgetenv("TEMP"); + #else + QString temp = QDir::tempPath(); + #endif QChar lastSymbol = temp[temp.length() - 1]; if (lastSymbol == QChar('/') || lastSymbol == QChar('\\')) { temp.chop(1);