aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--src/deck.rs2
-rw-r--r--src/main.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 6c6c970..2fe9313 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
target/
-deck
+deck.deck
deck.db
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 {
diff --git a/src/main.rs b/src/main.rs
index 32d0be5..44def4e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -12,7 +12,7 @@ use structopt::StructOpt;
#[derive(StructOpt)]
#[structopt()]
struct Opt {
- #[structopt(long, default_value = "deck")]
+ #[structopt(long, default_value = "deck.deck")]
deck: String,
}