mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-27 05:36:42 +00:00
core/reporter: Return in error case in SaveToFile()
If the path couldn't be created, then we shouldn't be attempting to save the file.
This commit is contained in:
parent
772c86a260
commit
7ad11e3867
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue