summaryrefslogtreecommitdiffstats
path: root/src/core/crypto/partition_data_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/crypto/partition_data_manager.cpp')
-rw-r--r--src/core/crypto/partition_data_manager.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/crypto/partition_data_manager.cpp b/src/core/crypto/partition_data_manager.cpp
index a4b09fd12..d64302f2e 100644
--- a/src/core/crypto/partition_data_manager.cpp
+++ b/src/core/crypto/partition_data_manager.cpp
@@ -204,11 +204,12 @@ static std::array<Key128, 0x20> FindEncryptedMasterKeyFromHex(const std::vector<
FileSys::VirtualFile FindFileInDirWithNames(const FileSys::VirtualDir& dir,
const std::string& name) {
- auto upper = name;
- std::transform(upper.begin(), upper.end(), upper.begin(), [](u8 c) { return std::toupper(c); });
+ const auto upper = Common::ToUpper(name);
+
for (const auto& fname : {name, name + ".bin", upper, upper + ".BIN"}) {
- if (dir->GetFile(fname) != nullptr)
+ if (dir->GetFile(fname) != nullptr) {
return dir->GetFile(fname);
+ }
}
return nullptr;