From ffe18679f3f1a7fc36ed6e892c2f98a901777572 Mon Sep 17 00:00:00 2001 From: N2614 Date: Mon, 7 Feb 2011 02:32:32 +0000 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=8A=9B=E7=94=A8=E3=83=87=E3=82=A3?= =?UTF-8?q?=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=82=92=E6=AF=8E=E5=9B=9E?= =?UTF-8?q?=E7=94=9F=E6=88=90=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=20=E3=83=AD=E3=82=B0=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E5=90=8D?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=81=AB=E8=BF=BD=E5=BE=93=20AP=E3=81=8C?= =?UTF-8?q?=E8=A6=8B=E3=81=A4=E3=81=8B=E3=82=89=E3=81=AA=E3=81=84=E3=83=AD?= =?UTF-8?q?=E3=82=B0=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92?= =?UTF-8?q?=E5=87=BA=E5=8A=9B=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@23 385bec56-5757-e545-9c3a-d8741f4650f1 --- .../ConsoleBackup/Controller.cpp | 2 +- .../ConsoleRestore/Controller.cpp | 12 +++++++++++- trunk/ConsoleDataMigration/common/FileName.h | 1 + trunk/ConsoleDataMigration/common/SdLogger.cpp | 9 +++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/trunk/ConsoleDataMigration/ConsoleBackup/Controller.cpp b/trunk/ConsoleDataMigration/ConsoleBackup/Controller.cpp index e27eb3d..16ab9a1 100644 --- a/trunk/ConsoleDataMigration/ConsoleBackup/Controller.cpp +++ b/trunk/ConsoleDataMigration/ConsoleBackup/Controller.cpp @@ -101,7 +101,7 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, s_ExistAPSettingAnnotation = true; common::PlaySound(common::SOUND_ANNOTATION); } - operationMessage.push_back(::std::string("APSetting.txt does not exist!")); + operationMessage.push_back(::std::string("Accsess_Point_Setting does not exist!")); } } else diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp index e7604b7..16bf330 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp @@ -93,7 +93,7 @@ bool CheckAndReadAPSetting(::std::vector& operationMessage) s_ExistAPSettingAnnotation = true; common::PlaySound(common::SOUND_ANNOTATION); } - operationMessage.push_back(::std::string("APSetting.txt does not exist!")); + operationMessage.push_back(::std::string("Accsess_Point_Setting does not exist!")); return false; } @@ -375,6 +375,16 @@ void ControlState(::std::vector& operationMessage, bool& nextStep, if (IsNetworkUpdateFinished()) { FinishFGNetworkUpdate(); + // エラーがあったら表示する + if(GetUpdateResult().IsFailure()) + { + // APが見つからない + if(GetUpdateResult() == nn::ac::ResultNotFoundAccessPoint()) + { + COMMON_LOGGER("No Access Point Found!"); + } + } + if (GetUpdateResult().IsSuccess()) { COMMON_LOGGER("Network Update Finished.\n"); diff --git a/trunk/ConsoleDataMigration/common/FileName.h b/trunk/ConsoleDataMigration/common/FileName.h index 95009e2..7d49ac7 100644 --- a/trunk/ConsoleDataMigration/common/FileName.h +++ b/trunk/ConsoleDataMigration/common/FileName.h @@ -26,6 +26,7 @@ const char* const SDMC_ARCHIVE_NAME = "sdmc:"; const char* const NAND_TWL_PHOTO_ARCHIVE_NAME = "twlp:"; const char* const NAND_TWL_SOUND_ARCHIVE_NAME = "twls:"; +const wchar_t* const LOG_ROOT_DIRECTORY_PATH = L"sdmc:/CTR_Console_Repair"; const wchar_t* const SD_SAVEDATA_ROOT_NAME = L"CTR_Console_Repair/CTRBackup/"; const wchar_t* const SD_SAVEDATA_TWL_PHOTO_ROOT_NAME = L"CTR_Console_Repair/TWLPhotoBackup/"; const wchar_t* const SD_SAVEDATA_TWL_SOUND_ROOT_NAME = L"CTR_Console_Repair/TWLSoundBackup/"; diff --git a/trunk/ConsoleDataMigration/common/SdLogger.cpp b/trunk/ConsoleDataMigration/common/SdLogger.cpp index 1ebf08d..8d1b7ad 100644 --- a/trunk/ConsoleDataMigration/common/SdLogger.cpp +++ b/trunk/ConsoleDataMigration/common/SdLogger.cpp @@ -138,6 +138,14 @@ void SdLogger::Print(const char* fmt, ::std::va_list arg) ::std::wstring log(common::SDMC_ROOT_DIRECTORY_PATH); log += common::LOG_FILENAME; + // ディレクトリが無ければ作る + nn::fs::Directory dir; + result = dir.TryInitialize(common::LOG_ROOT_DIRECTORY_PATH); + if(result.IsFailure()) + { + result = nn::fs::TryCreateDirectory(common::LOG_ROOT_DIRECTORY_PATH); + } + result = sd.TryInitialize(log.c_str(), true); if (result.IsSuccess()) { @@ -186,6 +194,7 @@ void SdLogger::Print(const char* fmt, ::std::va_list arg) PrintResultIfFailed(result, __LINE__); } + dir.Finalize(); sd.Finalize(); SdMountManager::Unmount(); }