From d424e85466ff4e49b2098548cb79707a036591f4 Mon Sep 17 00:00:00 2001 From: luca0N! Date: Tue, 22 Mar 2022 17:03:49 -0300 Subject: [PATCH] Ignore .swg_ignore directory SWG now ignores everything inside the .swg_ignore directory. --- src/WebsiteBuilder.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/WebsiteBuilder.cxx b/src/WebsiteBuilder.cxx index 892d514..6ba74fc 100644 --- a/src/WebsiteBuilder.cxx +++ b/src/WebsiteBuilder.cxx @@ -190,7 +190,9 @@ void build_website(SwgContext &ctx, std::string const &path) { try { for (auto const &ws_entry : std::filesystem::recursive_directory_iterator(ws)) { // Skip all files inside the "output" directory. - if (ws_entry.path().string().find(path + "output/") == 0) continue; + if (ws_entry.path().string().find(path + "output/") == 0 || + // Skip all files inside the ".swg_ignore" directory. + ws_entry.path().string().find(path + ".swg_ignore/") == 0) continue; std::string currentFile = getFilename(ws_entry.path()); // Assuming this is a non-MD file, copy it to the output. if (ws_entry.is_regular_file() &&