diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp index 12bb079..72e3108 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Controller.cpp @@ -1141,24 +1141,21 @@ void ControlState(::std::vector& operationMessage, bool& nextStep) // 削除処理 case RESTORE_CAL: { - static bool init = true; - if (init) + // ptmのセーブデータ移行後に時計を無効化する + nn::ptm::CTR::InvalidateSystemTime(); + + // cfgの本体固有値をcal値で初期化する + result = InitializeHardwareDependentSetting(); + if (result.IsFailure()) { - // ptmのセーブデータ移行後に時計を無効化する - nn::ptm::CTR::InvalidateSystemTime(); - - // cfgの本体固有値をcal値で初期化する - result = InitializeHardwareDependentSetting(); - if (result.IsFailure()) - { - s_RestoreState = FAIL; - } - - init = false; + s_RestoreState = FAIL; } + init = false; + s_RestoreState = CONNECT_ONLY; } + break; case DOWNLOAD_TWL: { diff --git a/trunk/ConsoleDataMigration/common/FileTransfer.cpp b/trunk/ConsoleDataMigration/common/FileTransfer.cpp index c67d566..6198b31 100644 --- a/trunk/ConsoleDataMigration/common/FileTransfer.cpp +++ b/trunk/ConsoleDataMigration/common/FileTransfer.cpp @@ -809,6 +809,8 @@ bool ConfirmFile(nn::fs::FileInputStream* from_file, nn::fs::FileStream* to_file else { NN_LOG("Verification Success %s, Rename\n", GetCharStr(sdPath)); + // 削除する + nn::fs::TryDeleteFile(truePath); // リネームする result = nn::fs::TryRenameFile(tmpPath, truePath); COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result);