From a1eaece1488a1c0b91090b9ebf4a535e86a2e754 Mon Sep 17 00:00:00 2001 From: rami Date: Sun, 16 Jun 2024 03:27:03 -0400 Subject: [PATCH] check if extension is md --- main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 9c60a6c..53cc8f1 100755 --- a/main.cpp +++ b/main.cpp @@ -40,7 +40,8 @@ namespace route { std::filesystem::path postsDir("posts"); std::vector> futures; for (auto const& entry : std::filesystem::directory_iterator{postsDir}) { - futures.emplace_back(std::async(std::launch::async, process_file, entry.path())); + if (entry.path().extension() == ".md") + futures.emplace_back(std::async(std::launch::async, process_file, entry.path())); }