mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
出力先ディレクトリを削除してから出力するように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@547 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
aac2a62c68
commit
26480cdb9a
@ -109,9 +109,11 @@ bool AddCmac(const wchar_t * from_path, void* buf, const size_t bufSize)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 出力先ディレクトリの作成
|
// 出力先ディレクトリを削除してから作成
|
||||||
const wchar_t* CMAC_DIR = L"CmacAdded/";
|
const wchar_t* CMAC_DIR = L"CmacAdded";
|
||||||
targetDirectory << from_path << CMAC_DIR;
|
targetDirectory << from_path << CMAC_DIR;
|
||||||
|
result = nn::fs::TryDeleteDirectoryRecursively(targetDirectory.str().c_str());
|
||||||
|
COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result);
|
||||||
result = nn::fs::TryCreateDirectory(targetDirectory.str().c_str());
|
result = nn::fs::TryCreateDirectory(targetDirectory.str().c_str());
|
||||||
if (result.IsFailure())
|
if (result.IsFailure())
|
||||||
{
|
{
|
||||||
@ -138,7 +140,7 @@ bool AddCmac(const wchar_t * from_path, void* buf, const size_t bufSize)
|
|||||||
|
|
||||||
target_to.str(L"");
|
target_to.str(L"");
|
||||||
target_to.clear(std::stringstream::goodbit);
|
target_to.clear(std::stringstream::goodbit);
|
||||||
target_to << from_path << CMAC_DIR << entry.entryName;
|
target_to << from_path << CMAC_DIR << L"/" <<entry.entryName;
|
||||||
|
|
||||||
// ディレクトリの場合
|
// ディレクトリの場合
|
||||||
if (entry.attributes.isDirectory)
|
if (entry.attributes.isDirectory)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user