fix directory scanner crash, libragephoto upstream

This commit is contained in:
Syping 2023-03-27 15:07:12 +02:00
parent 2d0830254b
commit aa4b2fc080
2 changed files with 11 additions and 3 deletions

View file

@ -285,10 +285,18 @@ void ProfileInterface::directoryChanged(const QString &path)
} }
if (fileName.startsWith("PGTA5") && !fileName.endsWith(".bak")) { if (fileName.startsWith("PGTA5") && !fileName.endsWith(".bak")) {
t_snapmaticPics << fileName; t_snapmaticPics << fileName;
if (!snapmaticPics.contains(fileName)) { if (fileName.endsWith(".hidden")) {
const QString originalFileName = fileName.left(fileName.length() - 7);
if (!snapmaticPics.contains(fileName) && !snapmaticPics.contains(originalFileName)) {
n_snapmaticPics << fileName; n_snapmaticPics << fileName;
} }
} }
else {
if (!snapmaticPics.contains(fileName) && !snapmaticPics.contains(fileName % ".hidden")) {
n_snapmaticPics << fileName;
}
}
}
} }
savegameFiles = t_savegameFiles; savegameFiles = t_savegameFiles;
snapmaticPics = t_snapmaticPics; snapmaticPics = t_snapmaticPics;

@ -1 +1 @@
Subproject commit 4ca8ac9297c571087836aab334a55f7414870876 Subproject commit cac7fd221f08a11e984d9b47b4383af548b388aa