mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
feat: add downloads directory argument for attachment download
Refs: #559
This commit is contained in:
+14
@@ -6,5 +6,19 @@ pub mod email;
|
||||
pub mod folder;
|
||||
pub mod manual;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use shellexpand_utils::{canonicalize, expand};
|
||||
|
||||
#[doc(inline)]
|
||||
pub use crate::email::{envelope, flag, message};
|
||||
|
||||
/// Parse the given [`str`] as [`PathBuf`].
|
||||
///
|
||||
/// The path is first shell expanded, then canonicalized (if
|
||||
/// applicable).
|
||||
fn dir_parser(path: &str) -> Result<PathBuf, String> {
|
||||
expand::try_path(path)
|
||||
.map(canonicalize::path)
|
||||
.map_err(|err| err.to_string())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user