b162f6717d
Fixes #63418 When IOOverrides are active, `fseGetType` and `fseGetTypeSync` used `utf8.encode(path)` which does not null-terminate the path. Native APIs require null-terminated paths. Through luck the sync path worked but the async path failed with `notFound`. Update them to use `FileSystemEntity._toUtf8Array(path)` which correctly null-terminates the path. Tested: added a regression test to tests/standalone/io/io_override_test.dart TAG=agy CONV=ab6af504-d536-4a8d-88be-bc487b60e24d R=bkonyi@google.com CoreLibraryReviewExempt: No API changes. Change-Id: I24e31efdcbecc703800b96a144e41a095a445cff Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505201 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Nate Bosch <nbosch@google.com> Auto-Submit: Nate Bosch <nbosch@google.com>