π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob] Check lock again before reporting file
Neeraj Gupta840fc3c061ab
diff --git a/mobile/lib/core/errors.dart b/mobile/lib/core/errors.dartindex b6d16802c3..0c0d16949a 100644--- a/mobile/lib/core/errors.dart+++ b/mobile/lib/core/errors.dart@@ -58,6 +58,8 @@ bool isHandledSyncError(Object errObj) {class LockAlreadyAcquiredError extends Error {}+class LockFreedError extends Error{}+class UnauthorizedError extends Error {}class RequestCancelledError extends Error {}diff --git a/mobile/lib/utils/file_uploader.dart b/mobile/lib/utils/file_uploader.dartindex bcef6f4c86..98c9d49fc2 100644--- a/mobile/lib/utils/file_uploader.dart+++ b/mobile/lib/utils/file_uploader.dart@@ -751,6 +751,11 @@ class FileUploader {if (SyncService.instance.shouldStopSync()) {throw SyncStopRequestedError();}+ final stillLocked = await _uploadLocks.isLocked(lockKey, _processType.toString());+ if (!stillLocked) {+ _logger.warning('file ${file.tag} report paused is missing');+ throw LockFreedError();+ }EnteFile remoteFile;if (isUpdatedFile) {