From dcd61846a71476c12a2934016ea397400fb11511 Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Tue, 26 Oct 2021 18:01:36 +0530 Subject: [PATCH] Parse updated files correctly --- lib/utils/file_uploader.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/file_uploader.dart b/lib/utils/file_uploader.dart index 84374e5bd..37a63e1cb 100644 --- a/lib/utils/file_uploader.dart +++ b/lib/utils/file_uploader.dart @@ -248,7 +248,7 @@ class FileUploader { } final fileOnDisk = await FilesDB.instance.getFile(file.generatedID); final wasAlreadyUploaded = fileOnDisk.uploadedFileID != null && - fileOnDisk.updationTime != null && + fileOnDisk.updationTime != -1 && fileOnDisk.collectionID == collectionID; if (wasAlreadyUploaded) { return fileOnDisk; @@ -293,7 +293,7 @@ class FileUploader { } Uint8List key; bool isUpdatedFile = - file.uploadedFileID != null && file.updationTime == null; + file.uploadedFileID != null && file.updationTime == -1; if (isUpdatedFile) { _logger.info("File was updated " + file.toString()); key = decryptFileKey(file);