mozilla-b2g/gaia — pull request #7871 by asutherland (2013-01-30 18:36:35+00:00)
Title: Bug 835149 - [email/IMAP] folder list sync breaks if IMAP server (ex: courier) returns folders in non-hierarchy order. r=squib, a=approval-gaia-v1 by sicking.

cherry-picked c721f35db7e372f316a162f1ec00c2d13ea8a1fb from gaia/master
which was landed in merge 622ae151f123ff2ca12d0335c40bb8e7a8442737

https://bugzilla.mozilla.org/show_bug.cgi?id=835149#c5