Get rid of workingDirChosen variable
It's set in every codepath where cWorkingDir is non-empty.
This commit is contained in:
parent
92a41c881d
commit
7dfeea3f4e
|
@ -354,30 +354,16 @@ void start() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto workingDirChosen = false;
|
|
||||||
|
|
||||||
if (cAlphaVersion()) {
|
|
||||||
workingDirChosen = true;
|
|
||||||
} else {
|
|
||||||
|
|
||||||
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 {
|
|
||||||
cForceWorkingDir(psAppDataPath());
|
|
||||||
workingDirChosen = true;
|
|
||||||
#endif // (!Q_OS_WIN && !_DEBUG) || Q_OS_WINRT || OS_WIN_STORE || OS_MAC_STORE
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
LogsData = new LogsDataFields();
|
LogsData = new LogsDataFields();
|
||||||
if (!workingDirChosen) {
|
if (cWorkingDir().isEmpty()) {
|
||||||
|
#if (!defined Q_OS_WIN && !defined _DEBUG) || defined Q_OS_WINRT || defined OS_WIN_STORE || defined OS_MAC_STORE
|
||||||
|
cForceWorkingDir(psAppDataPath());
|
||||||
|
#else // (!Q_OS_WIN && !_DEBUG) || Q_OS_WINRT || OS_WIN_STORE || OS_MAC_STORE
|
||||||
cForceWorkingDir(cExeDir());
|
cForceWorkingDir(cExeDir());
|
||||||
if (!LogsData->openMain()) {
|
if (!LogsData->openMain()) {
|
||||||
cForceWorkingDir(psAppDataPath());
|
cForceWorkingDir(psAppDataPath());
|
||||||
}
|
}
|
||||||
|
#endif // (!Q_OS_WIN && !_DEBUG) || Q_OS_WINRT || OS_WIN_STORE || OS_MAC_STORE
|
||||||
}
|
}
|
||||||
|
|
||||||
if (launcher.validateCustomWorkingDir()) {
|
if (launcher.validateCustomWorkingDir()) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user