Skip to content

Commit

Permalink
Fix path to private lib dir in update/remove helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAssassin committed Apr 19, 2020
1 parent 88c3578 commit b4ddd3b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/shared/shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,15 @@ bool installDesktopFileAndIcons(const QString& pathToAppImage, bool resolveColli
const QString installPrefixPath = QFileInfo(ownBinaryDirPath).dir().absolutePath();
QString privateLibDirPath = installPrefixPath + "/" + PRIVATE_LIBDIR;

// if there is no such directory like <prefix>/bin/../lib/... or the binary is not found there, there is a chance
// the binary is just next to this one (this is the case in the update/remove helpers)
// therefore we compare the binary directory path with PRIVATE_LIBDIR
if (!QDir(privateLibDirPath).exists()) {
if (privateLibDirPath.contains(PRIVATE_LIBDIR)) {
privateLibDirPath = ownBinaryDirPath;
}
}

// the following lines make things work during development: here, the build dir path is inserted instead, which
// allows for testing with the latest changes
if (!QDir(privateLibDirPath).exists()) {
Expand Down

0 comments on commit b4ddd3b

Please sign in to comment.