fix maildir expansion (#307)

* Applied shellexpand to maildir_dir

* change to account_config: applied shellexpand to maildir_dir

* rustfmt: removing required version, formatted project

* changing type of `maildir_dir` to `String` and adding shellexpand to
`maildir_dir`
This commit is contained in:
TornaxO7 2022-02-23 23:24:17 +01:00 committed by GitHub
parent b146d9b7e1
commit d5a494a01d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View file

@ -61,7 +61,6 @@ use_field_init_shorthand = false
force_explicit_abi = true
condense_wildcard_suffixes = false
color = "Auto"
required_version = "1.4.37"
unstable_features = false
disable_all_formatting = false
skip_children = false

View file

@ -191,7 +191,7 @@ impl<'a> AccountConfig {
}),
DeserializedAccountConfig::Maildir(config) => {
BackendConfig::Maildir(MaildirBackendConfig {
maildir_dir: config.maildir_dir.clone(),
maildir_dir: shellexpand::full(&config.maildir_dir)?.to_string().into(),
})
}
};

View file

@ -121,4 +121,4 @@ make_account_config!(
imap_passwd_cmd: String
);
make_account_config!(DeserializedMaildirAccountConfig, maildir_dir: PathBuf);
make_account_config!(DeserializedMaildirAccountConfig, maildir_dir: String);