From 07f8e198ecfb128a639f174ba5992fe1864ba5bc Mon Sep 17 00:00:00 2001 From: rklec <71322635+rklec@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:19:55 +0200 Subject: [PATCH] Adjust ImapFolder.Create(Async) to document proper ArgumentException case (#1789) ArgumentException is apparently not only thrown when the `name` is empty, but also when the server rejects it, because it e.g. has a directory separator char in it. See https://stackoverflow.com/questions/78844815/how-to-create-or-get-folders-in-mailkit-with-multiple-sub-folders-when-they-ar/78844857#78844857 for details. --- MailKit/Net/Imap/ImapFolder.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MailKit/Net/Imap/ImapFolder.cs b/MailKit/Net/Imap/ImapFolder.cs index 4edb530c56..c9614dc6c9 100644 --- a/MailKit/Net/Imap/ImapFolder.cs +++ b/MailKit/Net/Imap/ImapFolder.cs @@ -907,7 +907,7 @@ async Task CreateAsync (ImapCommand ic, string encodedName, bool sp /// is null. /// /// - /// is empty. + /// is empty or invalid. /// /// /// The has been disposed. @@ -954,7 +954,7 @@ public override IMailFolder Create (string name, bool isMessageFolder, Cancellat /// is null. /// /// - /// is empty. + /// is empty or invalid. /// /// /// The has been disposed. @@ -1061,7 +1061,7 @@ ImapCommand QueueCreateCommand (string name, IEnumerable specialU /// is null. /// /// - /// is empty. + /// is empty or invalid. /// /// /// The has been disposed. @@ -1113,7 +1113,7 @@ public override IMailFolder Create (string name, IEnumerable spec /// is null. /// /// - /// is empty. + /// is empty or invalid. /// /// /// The has been disposed.