fix log path

This commit is contained in:
Simon Stürz 2016-02-09 17:18:16 +01:00 committed by Michael Zanetti
parent 4f358141ac
commit 98bbd65922

View File

@ -190,7 +190,7 @@ QString GuhSettings::logPath()
{ {
QString logPath; QString logPath;
#ifdef SNAPPY #ifdef SNAPPY
logPath = qgetenv("SNAP_APP_DATA_PATH") + "/guhd.log"; logPath = qgetenv("SNAP_APP_DATA_PATH") + "/guhd.sqlite";
#else #else
QString organisationName = QCoreApplication::instance()->organizationName(); QString organisationName = QCoreApplication::instance()->organizationName();
@ -210,6 +210,9 @@ QString GuhSettings::logPath()
QString GuhSettings::consoleLogPath() QString GuhSettings::consoleLogPath()
{ {
QString consoleLogPath; QString consoleLogPath;
#ifdef SNAPPY
consoleLogPath = qgetenv("SNAP_APP_DATA_PATH") + "/guhd.log";
#else
QString organisationName = QCoreApplication::instance()->organizationName(); QString organisationName = QCoreApplication::instance()->organizationName();
if (organisationName == "guh-test") { if (organisationName == "guh-test") {
@ -219,6 +222,7 @@ QString GuhSettings::consoleLogPath()
} else { } else {
consoleLogPath = QDir::homePath() + "/.config/" + organisationName + "/guhd.log"; consoleLogPath = QDir::homePath() + "/.config/" + organisationName + "/guhd.log";
} }
#endif // SNAPPY
return consoleLogPath; return consoleLogPath;
} }