Fallback to other working directories in debug mode on Unix systems

Just like on Windows
This commit is contained in:
Ilya Fedin 2023-02-19 09:00:58 +04:00 committed by John Preston
parent dbe84d732c
commit 8099c28197

View file

@ -364,14 +364,13 @@ void start(not_null<Core::Launcher*> launcher) {
// This value must come from TelegramForcePortable // This value must come from TelegramForcePortable
// or from the "-workdir" command line argument. // or from the "-workdir" command line argument.
cForceWorkingDir(cWorkingDir()); cForceWorkingDir(cWorkingDir());
workingDirChosen = true;
} else { } else {
#if defined _DEBUG && !defined OS_MAC_STORE #if !defined _DEBUG || defined OS_MAC_STORE
cForceWorkingDir(cExeDir());
#else // _DEBUG
cForceWorkingDir(psAppDataPath()); cForceWorkingDir(psAppDataPath());
#endif // !_DEBUG workingDirChosen = true;
#endif // !_DEBUG || OS_MAC_STORE
} }
workingDirChosen = true;
#if !defined Q_OS_MAC && !defined _DEBUG // fix first version #if !defined Q_OS_MAC && !defined _DEBUG // fix first version
moveOldDataFrom = initialWorkingDir; moveOldDataFrom = initialWorkingDir;