Differences From Artifact [a5dd4c3dce]:
- File
src/OFZIPArchive.m
— part of check-in
[d1d36ae522]
at
2021-11-06 15:57:29
on branch trunk
— OFStream: New write API
The old write API made it too easy to lose bytes when a stream is set to
non-blocking mode. The new API always throws when not all bytes were
written, which forces handling the number of bytes being written being
smaller than the number of bytes requested to be written. (user: js, size: 23736) [annotate] [blame] [check-ins using]
To Artifact [349c80f1a5]:
- File src/OFZIPArchive.m — part of check-in [0eb7274946] at 2021-11-06 17:00:13 on branch trunk — Fix too strict OFEnsure introduced in last checkin (user: js, size: 23737) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
884 885 886 887 888 889 890 | if (INT64_MAX - _bytesWritten < (int64_t)length) @throw [OFOutOfRangeException exception]; @try { [_stream writeBuffer: buffer length: length]; } @catch (OFWriteFailedException *e) { | | | 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 | if (INT64_MAX - _bytesWritten < (int64_t)length) @throw [OFOutOfRangeException exception]; @try { [_stream writeBuffer: buffer length: length]; } @catch (OFWriteFailedException *e) { OFEnsure(e.bytesWritten <= length); _bytesWritten += (int64_t)e.bytesWritten; _CRC32 = OFCRC32(_CRC32, buffer, e.bytesWritten); if (e.errNo == EWOULDBLOCK) return e.bytesWritten; |
︙ | ︙ |