Skip to content

Commit

Permalink
Ignore errors when typing a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Aug 28, 2024
1 parent 4f73e8b commit 572c579
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/lw_file_system/lib/src/api/typed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,16 @@ class TypedDirectoryFileSystem<T> extends TypedFileSystem<T>
FileSystemDirectory<T> _toTypedDirectory(RawFileSystemDirectory directory) =>
FileSystemDirectory(
directory.location,
assets: directory.assets.map((e) => _toTypedAsset(e)).toList(),
assets: directory.assets
.map((e) {
try {
return _toTypedAsset(e);
} catch (_) {
return null;
}
})
.nonNulls
.toList(),
);

@override
Expand Down

0 comments on commit 572c579

Please sign in to comment.