From 8f87cfe29d9270215162e1c95a65ef00b1832342 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 8 Dec 2017 12:13:42 +0400 Subject: [PATCH] Fix explicit working dir by "-workdir" in Windows. Regression was introduced in ff84962148. Fixes #4129. --- Telegram/SourceFiles/logs.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 7dc19365e..5db94cafc 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -344,6 +344,13 @@ namespace Logs { cForceWorkingDir(psAppDataPath()); #endif // !_DEBUG workingDirChosen = true; +#elif defined Q_OS_WIN + } else { + if (!cWorkingDir().isEmpty()) { + // This value must come only from the "-workdir" argument. + cForceWorkingDir(cWorkingDir()); + workingDirChosen = true; + } #endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || OS_WIN_STORE }