From 8099c28197584208933041d4491a84f61e59bf0b Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 19 Feb 2023 09:00:58 +0400 Subject: [PATCH] Fallback to other working directories in debug mode on Unix systems Just like on Windows --- Telegram/SourceFiles/logs.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index b6905dcd1..254dba6b3 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -364,14 +364,13 @@ void start(not_null launcher) { // This value must come from TelegramForcePortable // or from the "-workdir" command line argument. cForceWorkingDir(cWorkingDir()); + workingDirChosen = true; } else { -#if defined _DEBUG && !defined OS_MAC_STORE - cForceWorkingDir(cExeDir()); -#else // _DEBUG +#if !defined _DEBUG || defined OS_MAC_STORE cForceWorkingDir(psAppDataPath()); -#endif // !_DEBUG + workingDirChosen = true; +#endif // !_DEBUG || OS_MAC_STORE } - workingDirChosen = true; #if !defined Q_OS_MAC && !defined _DEBUG // fix first version moveOldDataFrom = initialWorkingDir;