mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
[Verifier]ビルドエラー修正
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@235 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
976fe4cd92
commit
e60a75f616
@ -80,22 +80,13 @@ u32 s_VerifyFail = 0;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* GetCharStr(const wchar_t* path)
|
|
||||||
{
|
|
||||||
static char filename[nn::fs::MAX_FILE_PATH_LENGTH];
|
|
||||||
std::memset(filename, 0, sizeof(filename));
|
|
||||||
std::wcstombs(filename, path, sizeof(filename));
|
|
||||||
filename[sizeof(filename) - 1] = '\0';
|
|
||||||
return filename;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GenerateNandPath(wchar_t* toPath, const wchar_t* fromPath)
|
void GenerateNandPath(wchar_t* toPath, const wchar_t* fromPath)
|
||||||
{
|
{
|
||||||
// 切り詰める
|
// 切り詰める
|
||||||
std::string tmp(GetCharStr(fromPath));
|
std::string tmp(common::GetCharStr(fromPath));
|
||||||
std::string twlPhotoRoot(GetCharStr(common::SD_SAVEDATA_TWL_PHOTO_ROOT_NAME));
|
std::string twlPhotoRoot(common::GetCharStr(common::SD_SAVEDATA_TWL_PHOTO_ROOT_NAME));
|
||||||
std::string twlSoundRoot(GetCharStr(common::SD_SAVEDATA_TWL_SOUND_ROOT_NAME));
|
std::string twlSoundRoot(common::GetCharStr(common::SD_SAVEDATA_TWL_SOUND_ROOT_NAME));
|
||||||
std::string ctrRoot(GetCharStr(common::SD_SAVEDATA_ROOT_NAME));
|
std::string ctrRoot(common::GetCharStr(common::SD_SAVEDATA_ROOT_NAME));
|
||||||
|
|
||||||
std::string output;
|
std::string output;
|
||||||
|
|
||||||
@ -313,12 +304,12 @@ bool VerifyDirectory(const wchar_t * from_path, void* buf,
|
|||||||
ret_value = CalculateAndCompareCmac(&context, sdCmac);
|
ret_value = CalculateAndCompareCmac(&context, sdCmac);
|
||||||
if(!ret_value)
|
if(!ret_value)
|
||||||
{
|
{
|
||||||
COMMON_LOGGER("********** Verification Failed **********\n %s\n", GetCharStr(target_from.str().c_str()));
|
COMMON_LOGGER("********** Verification Failed **********\n %s\n", common::GetCharStr(target_from.str().c_str()));
|
||||||
s_VerifyFail++;
|
s_VerifyFail++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
COMMON_LOGGER("Success %s\n", GetCharStr(target_from.str().c_str()));
|
COMMON_LOGGER("Success %s\n", common::GetCharStr(target_from.str().c_str()));
|
||||||
s_VerifySuccess++;
|
s_VerifySuccess++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -339,12 +330,12 @@ bool VerifyDirectory(const wchar_t * from_path, void* buf,
|
|||||||
ret_value = CalculateAndCompareCmac(&context, sdCmac);
|
ret_value = CalculateAndCompareCmac(&context, sdCmac);
|
||||||
if(!ret_value)
|
if(!ret_value)
|
||||||
{
|
{
|
||||||
COMMON_LOGGER("********** Verification Failed **********\n %s\n", GetCharStr(target_from.str().c_str()));
|
COMMON_LOGGER("********** Verification Failed **********\n %s\n", common::GetCharStr(target_from.str().c_str()));
|
||||||
s_VerifyFail++;
|
s_VerifyFail++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
COMMON_LOGGER("Success %s\n", GetCharStr(target_from.str().c_str()));
|
COMMON_LOGGER("Success %s\n", common::GetCharStr(target_from.str().c_str()));
|
||||||
s_VerifySuccess++;
|
s_VerifySuccess++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user