Ignore .swg_ignore directory

SWG now ignores everything inside the .swg_ignore directory.
This commit is contained in:
luca0N! 2022-03-22 17:03:49 -03:00
parent 5ae637a52d
commit d424e85466
Signed by: luca0N
GPG Key ID: 2E7B4655CF16D7D6
1 changed files with 3 additions and 1 deletions

View File

@ -190,7 +190,9 @@ void build_website(SwgContext &ctx, std::string const &path) {
try { try {
for (auto const &ws_entry : std::filesystem::recursive_directory_iterator(ws)) { for (auto const &ws_entry : std::filesystem::recursive_directory_iterator(ws)) {
// Skip all files inside the "output" directory. // 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()); std::string currentFile = getFilename(ws_entry.path());
// Assuming this is a non-MD file, copy it to the output. // Assuming this is a non-MD file, copy it to the output.
if (ws_entry.is_regular_file() && if (ws_entry.is_regular_file() &&