check multiple file extension inclusions for custom cards (#4308)

This commit is contained in:
ebbit1q 2021-04-16 17:23:46 +02:00 committed by GitHub
parent ad0f313c9d
commit 5969656429
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -196,8 +196,11 @@ bool PictureLoaderWorker::cardImageExistsOnDisk(QString &setName, QString &corre
QString thisPath(it.next());
QFileInfo thisFileInfo(thisPath);
if (thisFileInfo.isFile() && thisFileInfo.baseName() == correctedCardname)
if (thisFileInfo.isFile() &&
(thisFileInfo.fileName() == correctedCardname || thisFileInfo.completeBaseName() == correctedCardname ||
thisFileInfo.baseName() == correctedCardname)) {
picsPaths << thisPath; // Card found in the CUSTOM directory, somewhere
}
}
if (!setName.isEmpty()) {