melib: fix wrong validation in Maildir save()

Path of folder was compared to folder names and saving to eg
'INBOX/Sent' would not result into mail being saved to Folder { name:
'Sent', path: 'INBOX/Sent' }
embed
Manos Pitsidianakis 2019-09-17 17:25:45 +03:00
parent 79212621af
commit b98ce8828c
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 1 additions and 1 deletions

View File

@ -471,7 +471,7 @@ impl MailBackend for MaildirType {
fn save(&self, bytes: &[u8], folder: &str, flags: Option<Flag>) -> Result<()> {
for f in self.folders.values() {
if f.name == folder {
if f.name == folder || f.path.to_str().unwrap() == folder {
let mut path = f.fs_path.clone();
path.push("cur");
{