diff --git a/trunk/ConsoleDataMigration/sources/tools/CmacAdder/main.cpp b/trunk/ConsoleDataMigration/sources/tools/CmacAdder/main.cpp index 46725fa..60e21c4 100644 --- a/trunk/ConsoleDataMigration/sources/tools/CmacAdder/main.cpp +++ b/trunk/ConsoleDataMigration/sources/tools/CmacAdder/main.cpp @@ -109,9 +109,11 @@ bool AddCmac(const wchar_t * from_path, void* buf, const size_t bufSize) return false; } - // 出力先ディレクトリの作成 - const wchar_t* CMAC_DIR = L"CmacAdded/"; + // 出力先ディレクトリを削除してから作成 + const wchar_t* CMAC_DIR = L"CmacAdded"; 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()); 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.clear(std::stringstream::goodbit); - target_to << from_path << CMAC_DIR << entry.entryName; + target_to << from_path << CMAC_DIR << L"/" <