Skip to content

Commit

Permalink
[native_toolchain_c] Fix NDK discovery (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharkes authored Nov 1, 2023
1 parent 285ee6c commit 53facde
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkgs/native_toolchain_c/lib/src/tool/tool_resolver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,13 @@ class InstallLocationResolver implements ToolResolver {
final result = <Uri>[];
final fileSystemEntities = await Glob(path).list().toList();
for (final fileSystemEntity in fileSystemEntities) {
if (await fileSystemEntity.exists()) {
result.add(fileSystemEntity.uri);
if (!await fileSystemEntity.exists()) {
continue;
}
if (fileSystemEntity is! Directory && path.endsWith('/')) {
continue;
}
result.add(fileSystemEntity.uri);
}
return result;
}
Expand Down

0 comments on commit 53facde

Please sign in to comment.