Marc Viala Perso wrote:
Hi Jonathan,
Thanks for handling this problem.
Just to push more information on that subject, I've just tried, this morning, to replace file_descriptor_source/ file_descriptor_sink by fs::ifstream/fs::ofstream instance in the filtering chain and the same code snippet seems to works, i.e.:
This is fixed now in branches/iostreams_dev, to be merged into trunk shortly. The following patch should fix 1.34.1: -- Index: file_descriptor.cpp =================================================================== --- file_descriptor.cpp (revision 43122) +++ file_descriptor.cpp (working copy) @@ -144,7 +144,7 @@ DWORD result; if (!::ReadFile(pimpl_->handle_, s, n, &result, NULL)) throw detail::bad_read(); - return static_caststd::streamsize(result); + return result == 0 ? -1 : static_caststd::streamsize(result); } #endif errno = 0; -- Jonathan Turkanis CodeRage http://www.coderage.com