mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
ファイル名をFileName.hに集約
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
This commit is contained in:
parent
ab767e5f96
commit
e471b78b69
@ -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(
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include "SdLogger.h"
|
||||
#include <string>
|
||||
#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())
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
#include <nn.h>
|
||||
#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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -19,8 +19,6 @@
|
||||
namespace common
|
||||
{
|
||||
|
||||
const char* const SDMC_ARCHIVE_NAME = "sdmc:";
|
||||
|
||||
//! @brief SDカードのMount状態を管理するためのクラスです
|
||||
class SdMountManager
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user