mu: add 'tickle' command, for renaming messages

The new command 'tickle' renames message files in place, which can be
useful for 3rd-party tools.
This commit is contained in:
djcb
2017-01-14 13:09:17 +02:00
parent f91969e0b7
commit 786e7c3d1f
6 changed files with 76 additions and 0 deletions

View File

@ -902,3 +902,19 @@ mu_msg_move_to_maildir (MuMsg *self, const char *maildir,
return self->_file ? TRUE : FALSE;
}
/*
* Rename a message-file, keeping the same flags. This is useful for tricking
* some 3rd party progs such as mbsync
*/
gboolean
mu_msg_tickle (MuMsg *self, GError **err)
{
g_return_val_if_fail (self, FALSE);
return mu_msg_move_to_maildir (self,
mu_msg_get_maildir (self),
mu_msg_get_flags (self),
FALSE, TRUE, err);
}