diff options
author | bunnei <bunneidev@gmail.com> | 2020-08-17 22:35:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-17 22:35:30 -0400 |
commit | 56c6a5def85cfd3001c88d69374e3fb164272b9e (patch) | |
tree | dfdceb64cc5c6c4f80f384206a080f77d7cc40ae /src/core/reporter.cpp | |
parent | 0c885249df93db3262ae6ed2df18ee1cad336723 (diff) | |
parent | c4ed791164df7e3e74042a37a62077b4dc4ade91 (diff) |
Merge pull request #4535 from lioncash/fileutil
common/fileutil: Convert namespace to Common::FS
Diffstat (limited to 'src/core/reporter.cpp')
-rw-r--r-- | src/core/reporter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp index 76cfa5a17..0becdf642 100644 --- a/src/core/reporter.cpp +++ b/src/core/reporter.cpp @@ -28,8 +28,9 @@ namespace { std::string GetPath(std::string_view type, u64 title_id, std::string_view timestamp) { - return fmt::format("{}{}/{:016X}_{}.json", FileUtil::GetUserPath(FileUtil::UserPath::LogDir), - type, title_id, timestamp); + return fmt::format("{}{}/{:016X}_{}.json", + Common::FS::GetUserPath(Common::FS::UserPath::LogDir), type, title_id, + timestamp); } std::string GetTimestamp() { @@ -40,13 +41,13 @@ std::string GetTimestamp() { using namespace nlohmann; void SaveToFile(json json, const std::string& filename) { - if (!FileUtil::CreateFullPath(filename)) { + if (!Common::FS::CreateFullPath(filename)) { LOG_ERROR(Core, "Failed to create path for '{}' to save report!", filename); return; } std::ofstream file( - FileUtil::SanitizePath(filename, FileUtil::DirectorySeparator::PlatformDefault)); + Common::FS::SanitizePath(filename, Common::FS::DirectorySeparator::PlatformDefault)); file << std::setw(4) << json << std::endl; } |