Mercurial > dovecot > core-2.2
diff src/lib-storage/index/dbox-single/sdbox-file.c @ 15163:c7a99d41e39e
lib-storage: mailbox_get_path() and friends can now return an error.
An upcoming "index" mailbox_list backend uses mailbox GUIDs as the directory
names. Doing a name => GUID lookup may fail, so the path lookup may fail.
This is a somewhat annoying change and perhaps it can be removed in future,
but for now it looks like it can't be avoided.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 26 Sep 2012 20:50:08 +0300 |
parents | f8c1ddf55b94 |
children | ce57bacc3010 |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-single/sdbox-file.c Wed Sep 26 18:01:01 2012 +0300 +++ b/src/lib-storage/index/dbox-single/sdbox-file.c Wed Sep 26 20:50:08 2012 +0300 @@ -25,8 +25,8 @@ file->file.primary_path = i_strdup_printf("%s/%s", mailbox_get_path(box), fname); - alt_path = mailbox_get_path_to(box, MAILBOX_LIST_PATH_TYPE_ALT_MAILBOX); - if (alt_path != NULL) + if (mailbox_get_path_to(box, MAILBOX_LIST_PATH_TYPE_ALT_MAILBOX, + &alt_path) > 0) file->file.alt_path = i_strdup_printf("%s/%s", alt_path, fname); }