diff options
author | nstraz@redhat.com <nstraz@redhat.com> | 2010-04-01 09:47:21 -0400 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-04-01 14:27:01 -0700 |
commit | 685cfcc9e876e9c611d2cb03e8ebd417a7f165b7 (patch) | |
tree | 18e1a2c6c8273ed8e4bc39d5c506979e81680b8e /notmuch.c | |
parent | b884ab2ef1b9e15b81d119089e64c2c0fa60012e (diff) |
Setup the GMimeStream only when needed
I ran into this while looking at the vim plugin. Vim's system() call
redirects output to a file and it was missing many of the part{ lines.
If stream_stdout is setup too early, it will overwrite the part start
when notmuch is redirected to a file.
Reviewed-by Carl Worth <cworth@cworth.org>: GMime is calling fseek
before every write to reset the FILE* to the position it believes is
correct based on the writes it has seen. Our code was getting
incorrect results because our GMime writes were interleaved with
non-GMime writes via printf.
The bug appears when writing to a file because it's seekable, but not
when writing to a pipe which is not.
Diffstat (limited to 'notmuch.c')
0 files changed, 0 insertions, 0 deletions