diff options
author | Joris | 2022-02-12 17:31:32 +0100 |
---|---|---|
committer | Joris | 2022-02-12 17:31:32 +0100 |
commit | c001d6ec59221b11af8e7aafce76002cc63604e6 (patch) | |
tree | 207f66170520411881d691588978cdaf87d51c85 /src/deck.rs | |
parent | 87e12144440b9525cbabdca5a9f79038a9a0f0e0 (diff) |
Hide deck extension when showing title
Diffstat (limited to 'src/deck.rs')
-rw-r--r-- | src/deck.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/deck.rs b/src/deck.rs index af322c6..3524c96 100644 --- a/src/deck.rs +++ b/src/deck.rs @@ -69,7 +69,7 @@ pub fn read(deck: &String) -> Result<Vec<Entry>> { } pub fn pp_from_path(path: &String) -> Option<String> { - Some(capitalize(Path::new(&path).file_name()?.to_str()?)) + Some(capitalize(Path::new(&path).with_extension("").file_name()?.to_str()?)) } fn capitalize(s: &str) -> String { |