Skip to content

Commit e07ea49

Browse files
committed
ignore vim temporary files when searching for posts
1 parent f454a4a commit e07ea49

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ impl Blog {
121121
// yeah this might blow up, but it won't
122122
let filename = path.file_name().unwrap().to_str().unwrap();
123123

124+
// ignore vim temporary files
125+
if filename.starts_with(".") && filename.ends_with(".swp") {
126+
continue;
127+
}
128+
124129
// we need to get the metadata out of the url
125130
let mut split = filename.splitn(4, "-");
126131

0 commit comments

Comments
 (0)