Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subfolder 'INBOX/Inbox' not returned #255

Closed
bardisco opened this issue Oct 27, 2015 · 3 comments
Closed

Subfolder 'INBOX/Inbox' not returned #255

bardisco opened this issue Oct 27, 2015 · 3 comments
Labels
bug Something isn't working

Comments

@bardisco
Copy link

If the INBOX of a mailbox contains a subfolder with the name 'Inbox', the folder is not returned when retrieving the subfolders for the INBOX.

Folder structure in the mailbox:

INBOX
- Inbox
- subfolder1
- Subfolder2

Code to retrieve the folders:

var inbox = imapClient.Inbox;
var folders = inbox.GetSubfolders();
foreach (var folder in folders)
{
    Console.WriteLine(folder.FullName);
}

imapClient.Disconnect(true);

Output written by the testcode:

INBOX/subfolder1
INBOX/subfolder2

Protocollogging:
C: A00000003 NAMESPACE
S: * NAMESPACE (("" "/")) NIL NIL
S: A00000003 OK NAMESPACE completed
C: A00000004 LIST "" "INBOX"
S: * LIST (\HasChildren) "/" INBOX
S: A00000004 OK LIST completed
C: A00000005 LIST "" "INBOX/%"
S: * LIST (\HasNoChildren) "/" INBOX/Inbox
S: * LIST (\HasNoChildren) "/" INBOX/subfolder1
S: * LIST (\HasNoChildren) "/" INBOX/subfolder2
S: A00000005 OK LIST completed

@jstedfast jstedfast added the bug Something isn't working label Oct 27, 2015
jstedfast added a commit that referenced this issue Oct 27, 2015
@jstedfast
Copy link
Owner

I don't have a server that I can test this on, but I think my above patch will fix this.

If you could test it, that would be fantastic.

@bardisco
Copy link
Author

The patch works great. The expected result is now returned

INBOX/Inbox
INBOX/subfolder1
INBOX/subfolder2

@jstedfast
Copy link
Owner

great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants