diff options
| author | 2019-02-20 21:24:25 -0500 | |
|---|---|---|
| committer | 2019-02-20 21:24:25 -0500 | |
| commit | 3273f93cd52ce38378617d098b9c3e552d28f0d4 (patch) | |
| tree | afd59fb82f719d785fc4070d3af8bc909a7741e6 /src | |
| parent | Merge pull request #2142 from lioncash/relocate (diff) | |
| download | yuzu-3273f93cd52ce38378617d098b9c3e552d28f0d4.tar.gz yuzu-3273f93cd52ce38378617d098b9c3e552d28f0d4.tar.xz yuzu-3273f93cd52ce38378617d098b9c3e552d28f0d4.zip | |
Fixes Unicode Key File Directories (#2120)
* Fixes Unicode Key File Directories
Adds code so that when loading a file it converts to UTF16 first, to
ensure the files can be opened. Code borrowed from FileUtil::Exists.
* Update src/core/crypto/key_manager.cpp
Co-Authored-By: Jungorend <Jungorend@users.noreply.github.com>
* Update src/core/crypto/key_manager.cpp
Co-Authored-By: Jungorend <Jungorend@users.noreply.github.com>
* Using FileUtil instead to be cleaner.
* Update src/core/crypto/key_manager.cpp
Co-Authored-By: Jungorend <Jungorend@users.noreply.github.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/crypto/key_manager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp index ca12fb4ab..dfac9a4b3 100644 --- a/src/core/crypto/key_manager.cpp +++ b/src/core/crypto/key_manager.cpp | |||
| @@ -398,7 +398,8 @@ static bool ValidCryptoRevisionString(std::string_view base, size_t begin, size_ | |||
| 398 | } | 398 | } |
| 399 | 399 | ||
| 400 | void KeyManager::LoadFromFile(const std::string& filename, bool is_title_keys) { | 400 | void KeyManager::LoadFromFile(const std::string& filename, bool is_title_keys) { |
| 401 | std::ifstream file(filename); | 401 | std::ifstream file; |
| 402 | OpenFStream(file, filename, std::ios_base::in); | ||
| 402 | if (!file.is_open()) | 403 | if (!file.is_open()) |
| 403 | return; | 404 | return; |
| 404 | 405 | ||