Consolidate cForceWorkingDir(psAppDataPath())

This commit is contained in:
Ilya Fedin 2023-08-14 11:07:29 +04:00 committed by John Preston
parent 3d769a6dce
commit 92a41c881d
1 changed files with 2 additions and 23 deletions

View File

@ -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();