Fix load7zLibrary()

QLibrary just checks the extension, but it doesn't check that the file exists...
This commit is contained in:
Luis Ángel San Martín 2024-09-22 11:28:29 +02:00
parent dedb1cbb2e
commit 97a416f7e4

View File

@ -126,7 +126,8 @@ QLibrary *YACReader::load7zLibrary()
{
#if defined Q_OS_UNIX && !defined Q_OS_MACOS
auto yacreader7zPath = QString(LIBDIR) + "/yacreader/7z.so";
if (QLibrary::isLibrary(yacreader7zPath)) {
QFileInfo sevenzlibrary(yacreader7zPath);
if (sevenzlibrary.exists()) {
return new QLibrary(yacreader7zPath);
} else {
return new QLibrary(QString(LIBDIR) + "/7zip/7z.so");