diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2019-11-09 11:47:26 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2019-11-09 11:47:26 +0200 |
commit | caf940a246c29fa75b5f587e38c20c9bc3476f2b (patch) | |
tree | 3cd6feeacfe90b5aff644a886f0ab2e16f7dd9b2 | |
parent | d38d139c7545ed616c0237bab5ca7db24cfccb80 (diff) | |
download | mailutils-caf940a246c29fa75b5f587e38c20c9bc3476f2b.tar.gz mailutils-caf940a246c29fa75b5f587e38c20c9bc3476f2b.tar.bz2 |
dotmail: fix opening in append-only mode
* libproto/dotmail/dotmail.c (dotmail_rescan_unlocked)
(dotmail_rescan): Skip if mailbox is not opened for reading.
-rw-r--r-- | libproto/dotmail/dotmail.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libproto/dotmail/dotmail.c b/libproto/dotmail/dotmail.c index 48ca75673..fa083bb98 100644 --- a/libproto/dotmail/dotmail.c +++ b/libproto/dotmail/dotmail.c | |||
@@ -331,2 +331,5 @@ dotmail_rescan_unlocked (mu_mailbox_t mailbox, mu_off_t offset) | |||
331 | 331 | ||
332 | if (!(mailbox->flags & MU_STREAM_READ)) | ||
333 | return 0; | ||
334 | |||
332 | rc = mu_streamref_create (&stream, mailbox->stream); | 335 | rc = mu_streamref_create (&stream, mailbox->stream); |
@@ -592,2 +595,5 @@ dotmail_rescan (mu_mailbox_t mailbox, mu_off_t offset) | |||
592 | 595 | ||
596 | if (!(mailbox->flags & MU_STREAM_READ)) | ||
597 | return 0; | ||
598 | |||
593 | mu_monitor_wrlock (mailbox->monitor); | 599 | mu_monitor_wrlock (mailbox->monitor); |