MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.59k stars 623 forks source link

[Suggestion] - Give preference to LIST over XLIST if LIST-EXTENDED is available in IMAPSession::fetchAllFolders #1908

Open thebodzio opened 3 years ago

thebodzio commented 3 years ago

IMAPSession::fetchAllFolders use XLIST to fetch folder list even if LIST-EXTENDED is available. Shouldn't it be otherwise, since XLIST became deprecated more than 7 years ago? What is more, there appears to be no code checking for LIST-EXTENDED capability and exposing this information in the same manner as for XLIST (e.g. mListExtendedEnabled for LIST-EXTENDED).

The following code should explain the situation:

https://github.com/MailCore/mailcore2/blob/fad23d736ed5a63cf8321469d3a98a583f55df97/src/core/imap/MCIMAPSession.cpp#L1555-L1560

XLIST is always preferred, even if LIST can provide the same information and is standard compliant.