Commit 2093159b authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

When calculating a folder hash (to find a missing slideshow), take into...

When calculating a folder hash (to find a missing slideshow), take into accound the file hash of 2 files inside the folder.
Should solve #779
parent 5238366f
Pipeline #43388 canceled with stage
......@@ -988,7 +988,19 @@ const QString ProjectClip::hash()
const QByteArray ProjectClip::getFolderHash(QDir dir, QString fileName)
QStringList files = dir.entryList(QDir::Files);
// Include file hash info in case we have several folders with same file names (can happen for image sequences)
if (!files.isEmpty()) {
QPair<QByteArray, qint64> hashData = calculateHash(dir.absoluteFilePath(files.first()));
if (files.size() > 1) {
hashData = calculateHash(dir.absoluteFilePath( / 2)));
QByteArray fileData = fileName.toUtf8();
return QCryptographicHash::hash(fileData, QCryptographicHash::Md5);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment