| ... | @@ -2026,7 +2026,16 @@ pub const Writer = struct { | ... | @@ -2026,7 +2026,16 @@ pub const Writer = struct { |
| 2026 | /// along with other write failures. | 2026 | /// along with other write failures. |
| 2027 | pub fn end(w: *Writer) EndError!void { | 2027 | pub fn end(w: *Writer) EndError!void { |
| 2028 | try w.interface.flush(); | 2028 | try w.interface.flush(); |
| 2029 | return w.file.setEndPos(w.pos); | 2029 | switch (w.mode) { |
| | 2030 | .positional, |
| | 2031 | .positional_reading, |
| | 2032 | => try w.file.setEndPos(w.pos), |
| | 2033 | |
| | 2034 | .streaming, |
| | 2035 | .streaming_reading, |
| | 2036 | .failure, |
| | 2037 | => {}, |
| | 2038 | } |
| 2030 | } | 2039 | } |
| 2031 | }; | 2040 | }; |
| 2032 | | 2041 | |