imap-deserializer: Allow ']' in atoms (e.g. folder names)
This permits IMAP folders to have names featuring square brackets. For example, AirMail for iOS creates a folder called "[Airmail]", which Geary should be able to handle. Fixes #1169.
This commit is contained in:
parent
3009610284
commit
e092be8f3a
1 changed files with 6 additions and 0 deletions
|
|
@ -575,6 +575,12 @@ public class Geary.Imap.Deserializer : BaseObject, Logging.Source {
|
|||
|
||||
case ']':
|
||||
if (ch != get_current_context_terminator()) {
|
||||
if (state == State.ATOM) {
|
||||
// Allow ']' in atom IFF it does not close the context
|
||||
// this is to allow [] in folder names
|
||||
append_to_string(ch);
|
||||
return State.ATOM;
|
||||
}
|
||||
warning("Received an unexpected closing brace");
|
||||
return State.FAILED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue