only show the cookie filename when using the -c parameter

This commit is contained in:
runebaas 2019-11-03 23:19:38 +01:00
parent cca285839c
commit 7a72b93405
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6

View file

@ -3,6 +3,7 @@ mod utils;
use crate::utils::*; use crate::utils::*;
use clap::{App, Arg}; use clap::{App, Arg};
use std::path::Path;
fn main() { fn main() {
// specify app // specify app
@ -79,7 +80,8 @@ fn main() {
// reveal the cookie // reveal the cookie
if options.show_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 ✨ // print it ✨