From 5969656429607623eedfa4bb0d42f848a98eff57 Mon Sep 17 00:00:00 2001 From: ebbit1q Date: Fri, 16 Apr 2021 17:23:46 +0200 Subject: [PATCH] check multiple file extension inclusions for custom cards (#4308) --- cockatrice/src/pictureloader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/pictureloader.cpp b/cockatrice/src/pictureloader.cpp index 03e15945..bac84958 100644 --- a/cockatrice/src/pictureloader.cpp +++ b/cockatrice/src/pictureloader.cpp @@ -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()) {