From 077dd667659cc1e579977d1cca0d4fe6934b6dad Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 15 Sep 2021 20:26:52 +0300 Subject: fix: allow topic pages to contain dots Previously, a topic of lars.wirzenius would be stored in lars.mdwn, which is wrong. Now it's stored in lars.wirzenius.mdwn. Sponsored-by: author --- src/journal.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/journal.rs b/src/journal.rs index c12ebfa..a48a63d 100644 --- a/src/journal.rs +++ b/src/journal.rs @@ -223,9 +223,7 @@ fn is_dir(path: &Path) -> bool { } fn topic_path(dirname: &Path, topic: &Path) -> PathBuf { - let mut path = dirname.join(topic); - path.set_extension("mdwn"); - path + dirname.join(&format!("{}.mdwn", topic.display())) } fn current_timestamp() -> String { -- cgit v1.2.1