Merge pull request #850 from ente-io/fix_bug_in_mapping_files

Fix bug in mapping existingFilesInDifferentCollection
This commit is contained in:
Vishnu Mohandas 2023-02-07 14:07:45 +05:30 committed by GitHub
commit e6a131c291
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -603,7 +603,9 @@ class FileUploader {
// case c and d
final File? fileExistsButDifferentCollection =
existingUploadedFiles.firstWhereOrNull(
(e) => e.collectionID != toCollectionID,
(e) =>
e.collectionID != toCollectionID &&
(e.localID == null || e.localID == fileToUpload.localID),
);
if (fileExistsButDifferentCollection != null) {
_logger.fine(