index-update-flags.c revision b37634f5bf23ff8c72b88ef6966fd5c730017419
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3Timo Sirainen/* Copyright (C) 2002 Timo Sirainen */
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainenint index_storage_update_flags(struct mail *mail,
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen struct index_mail *imail = (struct index_mail *) mail;
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen struct mail_storage *storage = mail->box->storage;
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen "Mailbox is read-only, ignoring flag changes",
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen /* \Recent can't be changed */
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen if (!index_mailbox_fix_custom_flags(ibox, &modify_flags,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen if (!ibox->index->update_flags(ibox->index, imail->data.rec,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen if (mail_custom_flags_has_changes(ibox->index->custom_flags)) {
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen storage->callbacks->new_custom_flags(&ibox->box,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen mail_custom_flags_list_get(ibox->index->custom_flags),