diff options
Diffstat (limited to 'src/common/file_util.cpp')
| -rw-r--r-- | src/common/file_util.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index aecb66c32..8a902dd68 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp | |||
| @@ -762,11 +762,11 @@ std::string GetNANDRegistrationDir(bool system) { | |||
| 762 | return GetUserPath(UserPath::NANDDir) + "user/Contents/registered/"; | 762 | return GetUserPath(UserPath::NANDDir) + "user/Contents/registered/"; |
| 763 | } | 763 | } |
| 764 | 764 | ||
| 765 | std::size_t WriteStringToFile(bool text_file, const std::string& str, const char* filename) { | 765 | std::size_t WriteStringToFile(bool text_file, const std::string& filename, std::string_view str) { |
| 766 | return FileUtil::IOFile(filename, text_file ? "w" : "wb").WriteBytes(str.data(), str.size()); | 766 | return IOFile(filename, text_file ? "w" : "wb").WriteString(str); |
| 767 | } | 767 | } |
| 768 | 768 | ||
| 769 | std::size_t ReadFileToString(bool text_file, const char* filename, std::string& str) { | 769 | std::size_t ReadFileToString(bool text_file, const std::string& filename, std::string& str) { |
| 770 | IOFile file(filename, text_file ? "r" : "rb"); | 770 | IOFile file(filename, text_file ? "r" : "rb"); |
| 771 | 771 | ||
| 772 | if (!file.IsOpen()) | 772 | if (!file.IsOpen()) |