From 7a72b934051e73a1e6723ee170870e79be10ad4c Mon Sep 17 00:00:00 2001 From: runebaas Date: Sun, 3 Nov 2019 23:19:38 +0100 Subject: [PATCH] only show the cookie filename when using the -c parameter --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 10401d4..b6dda6d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,7 @@ mod utils; use crate::utils::*; use clap::{App, Arg}; +use std::path::Path; fn main() { // specify app @@ -79,7 +80,8 @@ fn main() { // reveal the cookie if options.show_cookie { - println!("({})\n%", cookie.name); + let cookie_file = Path::new(&cookie.name).file_name().unwrap().to_str().unwrap(); + println!("({})\n%", cookie_file); } // print it ✨