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:
@@ -377,6 +377,8 @@ public:
|
||||
/**
|
||||
Reads the entire contents of the file into a string.
|
||||
|
||||
Since wxWidgets 3.1.1 this method also works for unseekable files.
|
||||
|
||||
@param str
|
||||
Non-@NULL pointer to a string to read data into.
|
||||
@param conv
|
||||
|
Reference in New Issue
Block a user