Skip to content

Commit

Permalink
Update windows_evb_config_generator.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
sun-jiao committed Mar 4, 2024
1 parent 03a58ae commit bde913f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dev/windows_evb_config_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ void buildDir(XmlBuilder builder, String name, List<FileSystemEntity> entities)
builder.element('OverwriteAttributes', nest: 'False');
builder.element('HideFromDialogs', nest: 0);
builder.element('Files', nest: () {
for (final dir in entities.whereType<Directory>()) {
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<File>()) {
buildFile(builder, file.name, file.absolute.path);
}
}
});
});
Expand Down

0 comments on commit bde913f

Please sign in to comment.