The previous way of just setting an error flag was getting ignored too
easily and causing silent corruption in such situations.
--HG--
branch : HEAD
struct file_istream *fstream = (struct file_istream *) stream;
if (!stream->istream.seekable) {
- if (v_offset < stream->istream.v_offset) {
- stream->istream.stream_errno = ESPIPE;
- return;
- }
+ if (v_offset < stream->istream.v_offset)
+ i_panic("stream doesn't support seeking backwards");
fstream->skip_left += v_offset - stream->istream.v_offset;
}