mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-24 04:11:14 -10:00
Some file systems, like procfs, can return 0 for a file's length, even though it actually contains on-demand computed contents. This breaks File.ReadAllBytes{Async}, which currently assumes that a length of 0 means the file is empty. This commit fixes it by changing the assumption to mean that a length of 0 means we can't depend on the Length and instead need to read until EOF.
Commit migrated from https://github.com/dotnet/corefx/commit/77bf4078608a5229afd3132115638b59215f478b