summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/reporter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp
index 774022569..79af28314 100644
--- a/src/core/reporter.cpp
+++ b/src/core/reporter.cpp
@@ -31,8 +31,10 @@ std::string GetTimestamp() {
using namespace nlohmann;
void SaveToFile(const json& json, const std::string& filename) {
- if (!FileUtil::CreateFullPath(filename))
+ if (!FileUtil::CreateFullPath(filename)) {
LOG_ERROR(Core, "Failed to create path for '{}' to save report!", filename);
+ return;
+ }
std::ofstream file(
FileUtil::SanitizePath(filename, FileUtil::DirectorySeparator::PlatformDefault));