GNOME Bugzilla – Bug 630149
imapx doesn't return errors
Last modified: 2013-08-28 13:42:13 UTC
store_sync() will attempt to sync every folder, but it'll abort its loop if it gets an error -- for example, if the operation has been cancelled. But imapx_sync() doesn't return error; it always returns TRUE. So we actually get as far as reconnecting to the server for *every* folder, before camel_read() notices the cancelled status and aborts the connection.
Created attachment 170653 [details] [review] patch This addresses part of the problem -- if we fail even to get a valid connection to the server, we can return error. I don't really understand the 'Sync twice' comment, or the logic behind not returning an error there -- we should probably fix that too.
Review of attachment 170653 [details] [review]: for 2.32 too
Reopening (for master at least) due to comment 1. There are still cases in which we should probably return errors, but don't.
It's committed to 2.32 already, and it fails for master branch. I'm setting patch status to 'committed'.
This is true for other operations too, for example when moving/copying a message into a read-only folder the imapx doesn't claim anything, but the old imap does show an error about permission. A quick debugging shows that the imapx_parser_thread() receives the error into its local_error variable, and stops itself when it's set, but hides the error for the current job, thus the user doesn't know about it. I do not know how to fix this, I'm just confirming the bug.
I rewrote error propagation in IMAPX for 3.10, which should address this issue. Closing as OBSOLETE.