From e3ba796fbd299400c9eb34b9cdb47e95eb35c20d Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Thu, 12 Oct 2023 12:11:50 +0530 Subject: [PATCH 1/2] Handle err while printing directory stat --- lib/ui/tools/debug/app_storage_viewer.dart | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/ui/tools/debug/app_storage_viewer.dart b/lib/ui/tools/debug/app_storage_viewer.dart index 920b4053a..055457e08 100644 --- a/lib/ui/tools/debug/app_storage_viewer.dart +++ b/lib/ui/tools/debug/app_storage_viewer.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart'; +import "package:logging/logging.dart"; import 'package:path_provider/path_provider.dart'; import 'package:photos/core/cache/video_cache_manager.dart'; import 'package:photos/core/configuration.dart'; @@ -29,6 +30,7 @@ class _AppStorageViewerState extends State { late String iosTempDirectoryPath; late bool internalUser; int _refreshCounterKey = 0; + final Logger _logger = Logger("_AppStorageViewerState"); @override void initState() { @@ -104,12 +106,16 @@ class _AppStorageViewerState extends State { } Future prettyStringDirectoryStats(List paths) async { - for (var path in paths) { - final DirectoryStat state = await getDirectoryStat(Directory(path)); - final content = prettyPrintDirectoryStat(state, path); - if (content.isNotEmpty) { - debugPrint(content); + try { + for (var path in paths) { + final DirectoryStat stat = await getDirectoryStat(Directory(path)); + final content = prettyPrintDirectoryStat(stat, path); + if (content.isNotEmpty) { + _logger.info(content); + } } + } catch (e) { + _logger.severe("Failed to print directory stats", e); } } From 1a6d76eb4eae00b975fd4130d306bddeec0491ed Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Thu, 12 Oct 2023 12:12:04 +0530 Subject: [PATCH 2/2] bump version to 0.7.101+501 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index b29b1bc4a..c6b5b35c2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ description: ente photos application # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 0.7.100+500 +version: 0.7.101+501 environment: sdk: ">=3.0.0 <4.0.0"