diff options
| -rw-r--r-- | src/core/reporter.cpp | 4 |
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() { | |||
| 31 | using namespace nlohmann; | 31 | using namespace nlohmann; |
| 32 | 32 | ||
| 33 | void SaveToFile(const json& json, const std::string& filename) { | 33 | void SaveToFile(const json& json, const std::string& filename) { |
| 34 | if (!FileUtil::CreateFullPath(filename)) | 34 | if (!FileUtil::CreateFullPath(filename)) { |
| 35 | LOG_ERROR(Core, "Failed to create path for '{}' to save report!", filename); | 35 | LOG_ERROR(Core, "Failed to create path for '{}' to save report!", filename); |
| 36 | return; | ||
| 37 | } | ||
| 36 | 38 | ||
| 37 | std::ofstream file( | 39 | std::ofstream file( |
| 38 | FileUtil::SanitizePath(filename, FileUtil::DirectorySeparator::PlatformDefault)); | 40 | FileUtil::SanitizePath(filename, FileUtil::DirectorySeparator::PlatformDefault)); |