From 92a41c881d9aeb6a72e70561f2f69d17046be73a Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 14 Aug 2023 11:07:29 +0400 Subject: [PATCH] Consolidate cForceWorkingDir(psAppDataPath()) --- Telegram/SourceFiles/logs.cpp | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 3ffa46bd02..bb7b891d83 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -360,37 +360,16 @@ void start() { workingDirChosen = true; } else { -#ifdef Q_OS_UNIX - if (!cWorkingDir().isEmpty()) { // This value must come from TelegramForcePortable workingDirChosen = true; +#if (!defined Q_OS_WIN && !defined _DEBUG) || defined Q_OS_WINRT || defined OS_WIN_STORE || defined OS_MAC_STORE } else { -#if !defined _DEBUG || defined OS_MAC_STORE cForceWorkingDir(psAppDataPath()); workingDirChosen = true; -#endif // !_DEBUG || OS_MAC_STORE +#endif // (!Q_OS_WIN && !_DEBUG) || Q_OS_WINRT || OS_WIN_STORE || OS_MAC_STORE } -#elif defined Q_OS_WINRT // Q_OS_UNIX - - cForceWorkingDir(psAppDataPath()); - workingDirChosen = true; - -#elif defined OS_WIN_STORE // Q_OS_UNIX || Q_OS_WINRT - - cForceWorkingDir(psAppDataPath()); - workingDirChosen = true; - -#elif defined Q_OS_WIN - - if (!cWorkingDir().isEmpty()) { - // This value must come from TelegramForcePortable - workingDirChosen = true; - } - -#endif // Q_OS_UNIX || Q_OS_WINRT || OS_WIN_STORE - } LogsData = new LogsDataFields();