From ffb3af289828c747f50f49f8c28c0ab3623d68a7 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 30 Oct 2024 16:01:28 +0800 Subject: [PATCH] Check for live photo against db entry instead of server entry Signed-off-by: Claudio Cambra --- src/libsync/discovery.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index b4e4b0434966d..05bdf1554bc0b 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -547,6 +547,7 @@ void ProcessDirectoryJob::processFile(PathTuple path, << " | e2eeMangledName: " << dbEntry.e2eMangledName() << "/" << serverEntry.e2eMangledName << " | file lock: " << localFileIsLocked << "//" << serverFileIsLocked << " | file lock type: " << localFileLockType << "//" << serverFileLockType + << " | live photo: " << dbEntry._isLivePhoto << "//" << serverEntry.isLivePhoto << " | metadata missing: /" << localEntry.isMetadataMissing << '/'; qCInfo(lcDisco).nospace() << processingLog; @@ -1122,7 +1123,7 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo( qCWarning(lcDisco) << "Failed to delete a file record from the local DB" << path._original; } return; - } else if (serverEntry.isLivePhoto && QMimeDatabase().mimeTypeForFile(item->_file).inherits(QStringLiteral("video/quicktime"))) { + } else if (dbEntry._isLivePhoto && QMimeDatabase().mimeTypeForFile(item->_file).inherits(QStringLiteral("video/quicktime"))) { // This is a live photo's video file; the server won't allow deletion of this file // so we need to *not* propagate the .mov deletion to the server and redownload the file qCInfo(lcDisco) << "Live photo video file deletion detected, redownloading" << item->_file;