Mercurial > dovecot > core-2.2
changeset 22475:bbf787982cff
sdbox: Don't open mail files when expunging
It was done when mail_attachment_fs was non-empty (and default is
non-empty), even though mail_attachment_dir was empty.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Fri, 25 Aug 2017 18:40:23 +0300 |
parents | eb01d3b9c90b |
children | 239bc902f6da |
files | src/lib-storage/index/dbox-common/dbox-attachment.c src/lib-storage/index/dbox-common/dbox-storage.c |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-common/dbox-attachment.c Mon Aug 21 15:44:41 2017 +0300 +++ b/src/lib-storage/index/dbox-common/dbox-attachment.c Fri Aug 25 18:40:23 2017 +0300 @@ -30,7 +30,7 @@ const char *path_suffix; uoff_t msg_size; - if (*file->storage->attachment_dir == '\0') { + if (file->storage->attachment_dir == NULL) { mail_storage_set_critical(&file->storage->storage, "%s contains references to external attachments, " "but mail_attachment_dir is unset", file->cur_path);
--- a/src/lib-storage/index/dbox-common/dbox-storage.c Mon Aug 21 15:44:41 2017 +0300 +++ b/src/lib-storage/index/dbox-common/dbox-storage.c Fri Aug 25 18:40:23 2017 +0300 @@ -96,7 +96,8 @@ const struct mail_storage_settings *set = _storage->set; const char *error; - if (*set->mail_attachment_fs != '\0') { + if (*set->mail_attachment_fs != '\0' && + *set->mail_attachment_dir != '\0') { const char *name, *args, *dir; args = strpbrk(set->mail_attachment_fs, ": ");