From e471b78b69aa5d4ec8f050ec4f9dcbf6d606f386 Mon Sep 17 00:00:00 2001 From: N2614 Date: Mon, 7 Feb 2011 01:41:49 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E5=90=8D?= =?UTF-8?q?=E3=82=92FileName.h=E3=81=AB=E9=9B=86=E7=B4=84?= 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@21 385bec56-5757-e545-9c3a-d8741f4650f1 --- trunk/ConsoleDataMigration/ConsoleBackup/Exporter.cpp | 2 +- trunk/ConsoleDataMigration/common/FileName.h | 3 ++- trunk/ConsoleDataMigration/common/SdLogger.cpp | 9 +++++---- trunk/ConsoleDataMigration/common/SdLogger.h | 5 ----- trunk/ConsoleDataMigration/common/SdMountManager.cpp | 5 +++-- trunk/ConsoleDataMigration/common/SdMountManager.h | 2 -- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/trunk/ConsoleDataMigration/ConsoleBackup/Exporter.cpp b/trunk/ConsoleDataMigration/ConsoleBackup/Exporter.cpp index efbf88f..975ca5b 100644 --- a/trunk/ConsoleDataMigration/ConsoleBackup/Exporter.cpp +++ b/trunk/ConsoleDataMigration/ConsoleBackup/Exporter.cpp @@ -111,7 +111,7 @@ void DeleteTrash() else { if (std::wcscmp(entryIndex->entryName, common::AP_SETTING_FILENAME) != 0 && std::wcscmp( - entryIndex->entryName, common::Logger::LOG_FILENAME) != 0) + entryIndex->entryName, common::LOG_FILENAME) != 0) { NN_LOG("Try Delete %ls%ls\n", currentDirectory.c_str(), entryIndex->entryName); result = nn::fs::TryDeleteFile( diff --git a/trunk/ConsoleDataMigration/common/FileName.h b/trunk/ConsoleDataMigration/common/FileName.h index f43c4ba..4716be0 100644 --- a/trunk/ConsoleDataMigration/common/FileName.h +++ b/trunk/ConsoleDataMigration/common/FileName.h @@ -22,13 +22,14 @@ namespace common { const char* const NAND_ARCHIVE_NAME = "nand:"; -const char* const SD_ARCHIVE_NAME = "sdmc:"; +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 SD_SAVEDATA_ROOT_NAME = L"CTR_ConsoleBackup/"; const wchar_t* const SD_SAVEDATA_TWL_PHOTO_ROOT_NAME = L"CTR_ConsoleBackup_TwlPhoto/"; const wchar_t* const SD_SAVEDATA_TWL_SOUND_ROOT_NAME = L"CTR_ConsoleBackup_TwlSound/"; +const wchar_t* const LOG_FILENAME = L"ConsoleBackup_log.txt"; const wchar_t* const COUNTRY_SETTING_PATHNAME = L"sdmc:/CountrySetting.bin"; const wchar_t* const AP_SETTING_FILENAME = L"APSetting.txt"; const wchar_t* const AP_SETTING_PATHNAME = L"sdmc:/APSetting.txt"; diff --git a/trunk/ConsoleDataMigration/common/SdLogger.cpp b/trunk/ConsoleDataMigration/common/SdLogger.cpp index db2b6c9..1ebf08d 100644 --- a/trunk/ConsoleDataMigration/common/SdLogger.cpp +++ b/trunk/ConsoleDataMigration/common/SdLogger.cpp @@ -16,6 +16,7 @@ #include "SdLogger.h" #include #include "SDMountManager.h" +#include "FileName.h" namespace common { @@ -134,8 +135,8 @@ void SdLogger::Print(const char* fmt, ::std::va_list arg) stringSize = nn::nstd::TVSNPrintf(str, sizeof(str), fmt, arg); - ::std::wstring log(SDMC_ROOT_NAME); - log += LOG_FILENAME; + ::std::wstring log(common::SDMC_ROOT_DIRECTORY_PATH); + log += common::LOG_FILENAME; result = sd.TryInitialize(log.c_str(), true); if (result.IsSuccess()) @@ -194,8 +195,8 @@ void SdLogger::Clear() nn::Result result; SdMountManager::Mount(); - ::std::wstring log(SDMC_ROOT_NAME); - log += LOG_FILENAME; + ::std::wstring log(common::SDMC_ROOT_DIRECTORY_PATH); + log += common::LOG_FILENAME; result = nn::fs::TryDeleteFile(log.c_str()); if(result.IsFailure()) diff --git a/trunk/ConsoleDataMigration/common/SdLogger.h b/trunk/ConsoleDataMigration/common/SdLogger.h index f770f35..8ad6d5a 100644 --- a/trunk/ConsoleDataMigration/common/SdLogger.h +++ b/trunk/ConsoleDataMigration/common/SdLogger.h @@ -24,11 +24,6 @@ namespace common namespace Logger { -const wchar_t* const SDMC_ROOT_NAME = L"sdmc:/"; -const wchar_t* const LOG_FILENAME = L"ConsoleBackup_log.txt"; -const wchar_t* const TEST_FILENAME = L"sdmc:/Test_ConsoleBackup"; - - class SdLogger { public: diff --git a/trunk/ConsoleDataMigration/common/SdMountManager.cpp b/trunk/ConsoleDataMigration/common/SdMountManager.cpp index 2aadcb4..336bebb 100644 --- a/trunk/ConsoleDataMigration/common/SdMountManager.cpp +++ b/trunk/ConsoleDataMigration/common/SdMountManager.cpp @@ -15,6 +15,7 @@ #include #include "SdMountManager.h" +#include "FileName.h" namespace common { @@ -50,7 +51,7 @@ nn::Result SdMountManager::Unmount() nn::Result result = nn::ResultSuccess(); if(m_MountCounter != 0 && --m_MountCounter == 0) { - result = nn::fs::Unmount(SDMC_ARCHIVE_NAME); + result = nn::fs::Unmount(common::SDMC_ARCHIVE_NAME); } return result; @@ -59,7 +60,7 @@ nn::Result SdMountManager::Unmount() nn::Result SdMountManager::ForceUnmount() { m_MountCounter = 0; - return nn::fs::Unmount(SDMC_ARCHIVE_NAME); + return nn::fs::Unmount(common::SDMC_ARCHIVE_NAME); } diff --git a/trunk/ConsoleDataMigration/common/SdMountManager.h b/trunk/ConsoleDataMigration/common/SdMountManager.h index 154387f..c4db65b 100644 --- a/trunk/ConsoleDataMigration/common/SdMountManager.h +++ b/trunk/ConsoleDataMigration/common/SdMountManager.h @@ -19,8 +19,6 @@ namespace common { -const char* const SDMC_ARCHIVE_NAME = "sdmc:"; - //! @brief SDカードのMount状態を管理するためのクラスです class SdMountManager {