From aa4b2fc080beb3e90b4cd01fa2d00961e8f5e264 Mon Sep 17 00:00:00 2001 From: Syping Date: Mon, 27 Mar 2023 15:07:12 +0200 Subject: [PATCH] fix directory scanner crash, libragephoto upstream --- src/ProfileInterface.cpp | 12 ++++++++++-- src/libragephoto | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ProfileInterface.cpp b/src/ProfileInterface.cpp index 713bec9..408cccc 100644 --- a/src/ProfileInterface.cpp +++ b/src/ProfileInterface.cpp @@ -285,8 +285,16 @@ void ProfileInterface::directoryChanged(const QString &path) } if (fileName.startsWith("PGTA5") && !fileName.endsWith(".bak")) { t_snapmaticPics << fileName; - if (!snapmaticPics.contains(fileName)) { - n_snapmaticPics << fileName; + if (fileName.endsWith(".hidden")) { + const QString originalFileName = fileName.left(fileName.length() - 7); + if (!snapmaticPics.contains(fileName) && !snapmaticPics.contains(originalFileName)) { + n_snapmaticPics << fileName; + } + } + else { + if (!snapmaticPics.contains(fileName) && !snapmaticPics.contains(fileName % ".hidden")) { + n_snapmaticPics << fileName; + } } } } diff --git a/src/libragephoto b/src/libragephoto index 4ca8ac9..cac7fd2 160000 --- a/src/libragephoto +++ b/src/libragephoto @@ -1 +1 @@ -Subproject commit 4ca8ac9297c571087836aab334a55f7414870876 +Subproject commit cac7fd221f08a11e984d9b47b4383af548b388aa