1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-07 16:15:32 +02:00

fix corrupt filename

This commit is contained in:
Jan Lukas Gernert 2020-01-27 17:32:17 +01:00
parent 98348b7e59
commit 71055eed1c

View file

@ -19,7 +19,7 @@ impl Article {
if let Some(ref html) = self.html {
if let Ok(()) = std::fs::create_dir_all(&path) {
let mut file_name = match self.title.clone() {
Some(file_name) => file_name,
Some(file_name) => file_name.replace("/", "_"),
None => "Unknown Title".to_owned(),
};
file_name.push_str(".html");