Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[locker] Avoid pub metadata decode for typed files

AmanRajSinghMouryaa8a20ab550ef
diff --git a/mobile/apps/locker/lib/services/info_file_service.dart b/mobile/apps/locker/lib/services/info_file_service.dart
index f7146c16ad..a9d579b7bf 100644
--- a/mobile/apps/locker/lib/services/info_file_service.dart
+++ b/mobile/apps/locker/lib/services/info_file_service.dart
@@ -153,7 +153,13 @@ class InfoFileService {
/// Checks if a file is an info file
bool isInfoFile(EnteFile file) {
- return file.pubMagicMetadata.info != null || file.fileType == FileType.info;
+ if (file.fileType == FileType.info) {
+ return true;
+ }
+ if (file.fileType != null && file.fileType != FileType.other) {
+ return false;
+ }
+ return file.pubMagicMetadata.info != null;
}
/// Gets the display title for an info file based on its content