On Saturday, 12 May 2018 07:18:03 PDT Roland Hughes wrote: > On 05/12/2018 08:57 AM, interest-requ...@qt-project.org wrote: > > On Thursday, 10 May 2018 23:11:04 PDT alexander golks wrote: > >> i think it "silently" breaks here without setting error condition on the > >> QFile when hitting errors on all chunks but the first one, thus returning > >> a > >> size lower the input array size, which is the behaviour i see. > > > > It's not an error to not write everything. > > It most certainly should be. Either everything got written or there was > a failure, device buffer full, whatever. > The only reason to not write everything is some error happened.
But how would you report that some of it got written successfully? It may be sufficient for the upper layer. Imagine the case of disk full. The application may be able to free up space or it could decide to wait until some other process did. But it needs to know how much of its data it did write. No, partial writes are success, so long as they report how much was successful. This is the case as well for write(2) and WriteFile. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest