소스 검색

key_manager: Create the keys directory if it does not exist

Morph 5 년 전
부모
커밋
806e2d7900
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/core/crypto/key_manager.cpp

+ 5 - 0
src/core/crypto/key_manager.cpp

@@ -568,6 +568,11 @@ KeyManager::KeyManager() {
     // Initialize keys
     const std::string hactool_keys_dir = Common::FS::GetHactoolConfigurationPath();
     const std::string yuzu_keys_dir = Common::FS::GetUserPath(Common::FS::UserPath::KeysDir);
+
+    if (!Common::FS::Exists(yuzu_keys_dir)) {
+        Common::FS::CreateDir(yuzu_keys_dir);
+    }
+
     if (Settings::values.use_dev_keys) {
         dev_mode = true;
         AttemptLoadKeyFile(yuzu_keys_dir, hactool_keys_dir, "dev.keys", false);