make mdir inbox condition case insensitive

This commit is contained in:
Clément DOUIN 2022-03-08 14:29:53 +01:00
parent 984eb8c9f7
commit d79c6c40a7
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72

View file

@ -43,7 +43,7 @@ impl<'a> MaildirBackend<'a> {
pub fn get_mdir_from_dir(&self, dir: &str) -> Result<maildir::Maildir> {
// If the dir points to the inbox folder, creates a maildir
// instance from the root folder.
if dir == "inbox" {
if dir.to_lowercase() == "inbox" {
self.validate_mdir_path(self.mdir.path().to_owned())
.map(maildir::Maildir::from)
} else {