# HG changeset patch # User Timo Sirainen # Date 1503675623 -10800 # Node ID bbf787982cffde28fa55e7468543c1f59c1c6fc0 # Parent eb01d3b9c90b168b7e44b99cffd7e7a5597511ab 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. diff -r eb01d3b9c90b -r bbf787982cff src/lib-storage/index/dbox-common/dbox-attachment.c --- 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); diff -r eb01d3b9c90b -r bbf787982cff src/lib-storage/index/dbox-common/dbox-storage.c --- 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, ": ");