From dc7066b559db6f3115810141009ab94bb4222650 Mon Sep 17 00:00:00 2001 From: Rosia E Evans Date: Fri, 29 Sep 2023 12:40:04 +0100 Subject: [PATCH] fixes bug with static folder copying where code would crash if files already existed in folder --- Resources/Output/Example_Post.html | 2 +- Resources/Static/LandingPageWireframe.html | 38 ------------------ Src/blog.cpp | 5 ++- .../MacroDefinitions.h.02EF76F9EA116331.idx | Bin 246 -> 270 bytes 4 files changed, 5 insertions(+), 40 deletions(-) delete mode 100644 Resources/Static/LandingPageWireframe.html diff --git a/Resources/Output/Example_Post.html b/Resources/Output/Example_Post.html index c3a1849..5ad198d 100644 --- a/Resources/Output/Example_Post.html +++ b/Resources/Output/Example_Post.html @@ -36,7 +36,7 @@

One last thing

... moomin

-

moomin

+

moomin

diff --git a/Resources/Static/LandingPageWireframe.html b/Resources/Static/LandingPageWireframe.html deleted file mode 100644 index 2325816..0000000 --- a/Resources/Static/LandingPageWireframe.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - -
- Rosia Evans -
-
-

- Welcome! -

-
- I'm Rosia Evans, this is my site where I log my work for myself and for me to show to - others. -
- -
- I'm currently studying at a small university in wales where I'm doing a BEng in - software engineering whilst working on robotics and exploring my own interests - on the side through various societies. I've previously had interests in VR and XR - and UI design, spending a lot of my secondary school years experimenting with both - concepts. -
- -
- See more about my work here: - -
- Work -
-
- - -
-
- - diff --git a/Src/blog.cpp b/Src/blog.cpp index 3ab6427..109ef0a 100644 --- a/Src/blog.cpp +++ b/Src/blog.cpp @@ -37,7 +37,9 @@ std::string getArg(int argc, char* argv[], std::string argIdString) void copyFolderAndContents(std::string inUrl, std::string outUrl) { - std::filesystem::copy(inUrl, outUrl, std::filesystem::copy_options::recursive); + std::filesystem::copy_options opts = std::filesystem::copy_options::update_existing | + std::filesystem::copy_options::recursive; + std::filesystem::copy(inUrl, outUrl, opts); } /* @@ -65,3 +67,4 @@ int main(int argc, char* argv[]) // TODO: get images and resources moved across to output // TODO: nav sections :eww: // TODO: copy static pages over +// TODO: code doesnt copy moomin diff --git a/build/.cache/clangd/index/MacroDefinitions.h.02EF76F9EA116331.idx b/build/.cache/clangd/index/MacroDefinitions.h.02EF76F9EA116331.idx index 36f2ec3d88addf055de96d887305872f7241a493..c11f865ea0286c982eb876995ffc3f833be63e58 100644 GIT binary patch delta 72 zcmeyy*vG^c+!z5f}x7&$mN$=kfw|0=fdK$;gbx7# delta 33 pcmeBU`o_o>