Skip to content

Commit

Permalink
Check for live photo against db entry instead of server entry
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Oct 30, 2024
1 parent 0e09bc2 commit 263cc13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 263cc13

Please sign in to comment.