Skip to content

armgit / ente

Public Imported from GitHub
0

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

Avoid reporting invalid EXIF dates

Neeraj Gupta96a170cda06d
diff --git a/mobile/apps/photos/lib/utils/exif_util.dart b/mobile/apps/photos/lib/utils/exif_util.dart
index 98d97ca92a..68b5315649 100644
--- a/mobile/apps/photos/lib/utils/exif_util.dart
+++ b/mobile/apps/photos/lib/utils/exif_util.dart
@@ -143,8 +143,8 @@ Future<ParsedExifDateTime?> tryParseExifDateTime(
}
try {
return getDateTimeInDeviceTimezone(exifTime, exifOffsetTime);
- } on FormatException catch (e) {
- _logger.warning("Ignoring invalid EXIF date time", e);
+ } on FormatException {
+ _logger.warning("Ignoring invalid EXIF date time: $exifTime");
}
} catch (e, s) {
_logger.severe("failed to getCreationTimeFromEXIF", e, s);
diff --git a/mobile/apps/photos/test/utils/exif_util_test.dart b/mobile/apps/photos/test/utils/exif_util_test.dart
index 89b1a4b7ef..58f2a2d71c 100644
--- a/mobile/apps/photos/test/utils/exif_util_test.dart
+++ b/mobile/apps/photos/test/utils/exif_util_test.dart
@@ -220,7 +220,7 @@ void main() {
final parsed = await tryParseExifDateTime(null, {
kDateTimeOriginal: _ifdTag(
const IfdNone(),
- printable: "2025:02:30 08:00:00.945",
+ printable: "2025:12:13 14:24:60",
),
});