diff --git a/dev/windows_evb_config_generator.dart b/dev/windows_evb_config_generator.dart index 2ce2c6e..5c2e6ec 100644 --- a/dev/windows_evb_config_generator.dart +++ b/dev/windows_evb_config_generator.dart @@ -82,12 +82,13 @@ void buildDir(XmlBuilder builder, String name, List entities) builder.element('OverwriteAttributes', nest: 'False'); builder.element('HideFromDialogs', nest: 0); builder.element('Files', nest: () { - for (final dir in entities.whereType()) { - buildDir(builder, dir.name, dir.listSync()); - } + for (final entity in entities) { + if (entity is Directory) { + buildDir(builder, entity.name, entity.listSync()); + } else if (entity is File) { + buildFile(builder, entity.name, entity.absolute.path); - for (final file in entities.whereType()) { - buildFile(builder, file.name, file.absolute.path); + } } }); });