From 684c702feeb30eded7576c46acf12f5e90f4f917 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 8 Sep 2016 18:54:19 +0200 Subject: [PATCH] Simplify findAppBinary --- shared/shared.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index 81a7b46..043c4f6 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -281,15 +281,13 @@ QString findAppBinary(const QString &appDirPath) // FIXME: Do without the need for an AppRun symlink // by passing appBinaryPath from main.cpp here - QString parentDir = QDir::cleanPath(QFileInfo(appDirPath).path()); - QString appDir = QDir::cleanPath(QFileInfo(appDirPath).baseName()); - binaryPath = parentDir + "/" + appDir + "/AppRun"; + binaryPath = appDirPath + "/AppRun"; if (QFile::exists(binaryPath)) return binaryPath; - LogError() << "Could not find bundle binary for" << appDirPath; - return QString(); + LogError() << "Could not find bundle binary for" << appDirPath << "at" << binaryPath; + exit(1); } QStringList findAppLibraries(const QString &appDirPath)