~asimpson/mailpreview-cli

d4ae6a28e01502407b80da563e91e9c7a5ce29f0 — Adam Simpson 2 years ago 047b448
fix: replace slashes in Message-ID with dashes because file paths
1 files changed, 1 insertions(+), 1 deletions(-)

M src/main.rs
M src/main.rs => src/main.rs +1 -1
@@ 39,7 39,7 @@ fn main() -> Result<(), Box<dyn Error>> {
        .headers
        .get_first_value("Message-ID")
        .expect("Message-ID");
    let file_name = format!("/tmp/{}", message_id);
    let file_name = format!("/tmp/{}", message_id.replace("/", "-"));
    let body = return_body(mail).expect("parsed body");

    File::create(&file_name)?.write_all(body.as_bytes())?;