Improve the FileNotFoundExceptions thrown by OSFileSystem.open.
When I improved the internals of java.io.File, I failed to keep
OSFileSystem.open (which uses the internals of java.io.File) in
sync, leading to misleading error reporting. java.io.File's
internals now include a trailing NUL, which is useful for the
native code but confuses Java if it tries to decode the byte[]
as a UTF-8 sequence.
This patch fixes the bug and also improves OSFileSystem.open's
error reporting to include the reason for the failure.
Bug: 2313271
4 files changed