Add WindowsESD copy checkbox

This commit is contained in:
paravis committed 2026-11-08 19:33:34 +03:00
1 parent b5c4f880bc
commit c23d9fa56a
4 files changed
+65 -7

No files matched your search

+11
View File
@@ -6,6 +6,7 @@
#include <cctype>
#include <cstdlib>
#include <cwchar>
#include <filesystem>
#include <string>
#include <vector>
@@ -223,6 +224,9 @@ void App::Apply()
static_cast<double>(p3) / 1024.0);
message += L"Затем на разделы будут распакованы файлы из архива Data.pf\r\n";
message += L"(1 -> PARAVIS, 2 -> VTOYEFI, 3 -> DATA).\r\n\r\n";
if (noEsd) {
message += L"Папка WindowsESD на раздел DATA копироваться не будет.\r\n\r\n";
}
message += L"ВНИМАНИЕ! ВСЕ ДАННЫЕ НА ЭТОМ ДИСКЕ БУДУТ УНИЧТОЖЕНЫ.\r\n";
message += L"Продолжить?";
@@ -451,6 +455,13 @@ int App::ApplyImages(int disk, const std::wstring& wim)
return 2;
}
if (i == 2 && noEsd) {
std::wstring esdDir = dir + L"WindowsESD";
std::error_code ec;
std::filesystem::remove_all(esdDir, ec);
DebugLog(L"skip WindowsESD: remove_all %s ec=%d", esdDir.c_str(), ec.value());
}
++applied;
if (cancel) {