Skip to content

Commit

Permalink
Fix building on Windows for non-latin usernames.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dman95 committed Feb 13, 2023
1 parent 32a08da commit 61b98a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 61b98a6

Please sign in to comment.