From 6fce7f87e1ace691ad534ec9c79523cb1d7c4c18 Mon Sep 17 00:00:00 2001 From: TheGreatRambler Date: Fri, 31 Dec 2021 00:36:21 -0700 Subject: [PATCH] Remove generated file if using code command line parameter --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 946c370..f9b5b65 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1016,6 +1016,11 @@ int main(int argc, char** argv) { levels["subworld"]->ExportToJSON(result["subworldJson"].as()); } } + + if(result.count("code")) { + std::filesystem::remove(path); + } + return 0; } else { fmt::print("Path {} does not exist\n", path);