From c8919645a0a96a42d1d1303496eb88548995a538 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Thu, 25 Dec 2025 16:58:59 +0100 Subject: [PATCH] check directory exists --- app/lib/utils/filesystem.dart | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/lib/utils/filesystem.dart b/app/lib/utils/filesystem.dart index cd4e2d5a..1202675b 100644 --- a/app/lib/utils/filesystem.dart +++ b/app/lib/utils/filesystem.dart @@ -49,11 +49,13 @@ final profileMozillaDirectoryTransformer = handleData: (entity, sink) { final mozillaDir = Directory(p.join(entity.path, 'mozilla')); - for (final entity in mozillaDir.listSync()) { - if (entity is Directory) { - final profile = p.basename(entity.path); - if (profile.endsWith('.default')) { - sink.add(entity); + if (mozillaDir.existsSync()) { + for (final entity in mozillaDir.listSync()) { + if (entity is Directory) { + final profile = p.basename(entity.path); + if (profile.endsWith('.default')) { + sink.add(entity); + } } } }