Make wxFile::ReadAll() work for unseekable files too

Calling this function with an unseekable file, such as any file under
/sys on Linux systems, would previously just hang as the loop condition
was never satisfied when length was -1.

Fix this by checking for this case and using a different approach by
extending the buffer we read the data into as we go instead of
preallocating it all at once.

See #9965.
This commit is contained in:
Vadim Zeitlin
2017-12-15 18:34:43 +01:00
parent ebcba7a385
commit a30bee473e
4 changed files with 86 additions and 12 deletions

View File

@@ -106,6 +106,7 @@ All:
- Add UTF-8 support to wxZipOutputStream (Tobias Taschner).
- Update all bundled 3rd party libraries to their latest versions.
- Use unique prefix for all zlib symbols to avoid link conflicts.
- Make wxFile::ReadAll() work for unseekable files too.
All (GUI):