2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 08:35:21 +00:00
This commit is contained in:
John Preston
2014-07-30 11:09:05 +04:00

View File

@@ -120,9 +120,15 @@ void logsInit() {
if (mainLogStream) return; if (mainLogStream) return;
QString wasDir = cWorkingDir(); QString wasDir = cWorkingDir();
#if (defined Q_OS_MAC || defined Q_OS_LINUX) && !defined _DEBUG #if (defined Q_OS_MAC || defined Q_OS_LINUX)
#ifdef _DEBUG
cForceWorkingDir(cExeDir());
#else
cForceWorkingDir(psAppDataPath()); cForceWorkingDir(psAppDataPath());
#ifdef Q_OS_LINUX // fix first version #endif
#if (defined Q_OS_LINUX && !defined _DEBUG) // fix first version
{ {
QFile data(wasDir + "data"), dataConfig(wasDir + "data_config"), tdataConfig(wasDir + "tdata/config"); QFile data(wasDir + "data"), dataConfig(wasDir + "data_config"), tdataConfig(wasDir + "tdata/config");
if (data.exists() && dataConfig.exists() && !QFileInfo(cWorkingDir() + "data").exists() && !QFileInfo(cWorkingDir() + "data_config").exists()) { // move to home dir if (data.exists() && dataConfig.exists() && !QFileInfo(cWorkingDir() + "data").exists() && !QFileInfo(cWorkingDir() + "data_config").exists()) { // move to home dir