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

Fix incorrect hash check causing incorrect reload dialog on project opening

parent dff5f709
Pipeline #35576 passed with stage
in 23 minutes
......@@ -316,10 +316,10 @@ bool DocumentChecker::hasErrorInClips()
} else if (service.startsWith(QLatin1String("avformat"))) {
// Check if file changed
QByteArray hash = Xml::getXmlProperty(e, "kdenlive:file_hash").toLatin1();
const QByteArray hash = Xml::getXmlProperty(e, "kdenlive:file_hash").toLatin1();
if (!hash.isEmpty()) {
QByteArray fileData = ProjectClip::calculateHash(resource).first;
if (hash != QCryptographicHash::hash(fileData, QCryptographicHash::Md5)) {
const QByteArray fileData = ProjectClip::calculateHash(resource).first.toHex();
if (hash != fileData) {
// Clip was changed, notify and trigger clip reload
Xml::removeXmlProperty(e, "kdenlive:file_hash");
Markdown is supported
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