From 4ec19688b23f082476ad6954b6e1e3af9a6a4374 Mon Sep 17 00:00:00 2001 From: rosia Date: Tue, 10 Jun 2025 22:09:51 +0100 Subject: [PATCH] bug fix --- Src/blog.cpp | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Src/blog.cpp b/Src/blog.cpp index cf81006..9471d4a 100644 --- a/Src/blog.cpp +++ b/Src/blog.cpp @@ -55,20 +55,6 @@ void copyFolderAndContents(std::string inUrl, std::string outUrl) std::filesystem::copy(inUrl, outUrl, opts); } -void checkForEmptyArguments() -{ - // I hate doing it like this - if (source.empty() || - output.empty() || - stat.empty() || - siteWebUrl.empty() || - blogTemplate.empty() || - atomTemplate.empty()) - { - exit(0); - } -} - /* * -in="" // give source folder * -out="" // give output folder @@ -84,7 +70,16 @@ int main(int argc, char* argv[]) std::string blogTemplate = getArgValue(argc, argv, "-blogTemplate="); std::string atomTemplate = getArgValue(argc, argv, "-atomTemplate="); - checkForEmptyArguments(); + // I hate doing it like this + if (source.empty() || + output.empty() || + stat.empty() || + siteWebUrl.empty() || + blogTemplate.empty() || + atomTemplate.empty()) + { + exit(0); + } int flags = OptionFlags::NONE; if (doesArgExist(argc, argv, "-hide"))