diff --git a/src/main.h b/src/main.h index 8adbaa4..d743e11 100644 --- a/src/main.h +++ b/src/main.h @@ -1,5 +1,5 @@ #pragma once #include "version.h" -#define PLUGIN_VERSION "v0.1.5" +#define PLUGIN_VERSION "v0.1.6" #define PLUGIN_VERSION_FULL PLUGIN_VERSION PLUGIN_VERSION_EXTRA diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp index b3cd039..199692c 100644 --- a/src/utils/utils.cpp +++ b/src/utils/utils.cpp @@ -75,7 +75,7 @@ void Utils::DumpOTPAndSeeprom() { return; } std::string backupPathConsole = string_format(BACKUPS_DIRECTORY_FULL "/%s", serialId.c_str()); - std::string backupPathConsoleOtpPath = backupPathConsole + "/opt.bin"; + std::string backupPathConsoleOtpPath = backupPathConsole + "/otp.bin"; std::string backupPathConsoleSeepromPath = backupPathConsole + "/seeprom.bin"; if (!FSUtils::CreateSubfolder(backupPathConsole.c_str())) { @@ -83,7 +83,7 @@ void Utils::DumpOTPAndSeeprom() { } bool seepromExists = FSUtils::CheckFile(backupPathConsoleSeepromPath.c_str()); - bool optExists = FSUtils::CheckFile(backupPathConsoleOtpPath.c_str()); + bool otpExists = FSUtils::CheckFile(backupPathConsoleOtpPath.c_str()); if (!seepromExists) { uint8_t data[0x200] = {}; @@ -99,7 +99,7 @@ void Utils::DumpOTPAndSeeprom() { } else { DEBUG_FUNCTION_LINE_VERBOSE("SEEPROM backup already exists"); } - if (!optExists) { + if (!otpExists) { WiiUConsoleOTP otp = {}; if (Mocha_ReadOTP(&otp) != MOCHA_RESULT_SUCCESS) { DEBUG_FUNCTION_LINE_WARN("Failed to read otp"); @@ -113,4 +113,10 @@ void Utils::DumpOTPAndSeeprom() { } else { DEBUG_FUNCTION_LINE_VERBOSE("OTP backup already exists"); } + + // Remove wrong file with typo + std::string backupPathConsoleOTPPathTypo = backupPathConsole + "/opt.bin"; + if (FSUtils::CheckFile(backupPathConsoleOTPPathTypo.c_str())) { + remove(backupPathConsoleOTPPathTypo.c_str()); + } } \ No newline at end of file