Skip to content

Commit

Permalink
fix a bug of getting running application's file path.
Browse files Browse the repository at this point in the history
  • Loading branch information
aoym committed Nov 21, 2015
1 parent eabb2f1 commit 53d7cf9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/tfmanager/main.cpp
Original file line number Diff line number Diff line change
@@ -246,7 +246,13 @@ static qint64 runningApplicationPid(const QString &appRoot = QString())

static QString runningApplicationsFilePath()
{
return QDir::homePath() + QDir::separator() + ".treefrog" + QDir::separator() + "runnings";
QString home = QDir::homePath();
#ifdef Q_OS_LINUX
if (home == QDir::rootPath()) {
home = QLatin1String("/root");
}
#endif
return home + QDir::separator() + ".treefrog" + QDir::separator() + "runnings";
}


0 comments on commit 53d7cf9

Please sign in to comment.