Lock is Safe Mode only for backup restores

This commit is contained in:
2Shirt 2025-12-13 16:59:19 -08:00
parent 8495d62a06
commit b8fe43fd8f
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 7 additions and 2 deletions

View file

@ -254,10 +254,15 @@ impl App {
}
// Create boot files
let safe_mode = if wim_file.is_backup {
boot::SafeMode::Enable
} else {
boot::SafeMode::Disable
};
for task in boot::configure_disk(
&letter_boot,
&letter_os,
boot::SafeMode::Enable,
safe_mode,
&system32,
&table_type,
) {

View file

@ -197,7 +197,7 @@ pub fn scan_network_share(config: Config, wim_sources_arc: Arc<Mutex<WimSources>
if let Ok(item) = item
&& item.file_name().to_string_lossy().ends_with(".wim")
&& let Some(path_str) = item.path().to_str()
&& let Ok(new_source) = parse_wim_file(path_str, true)
&& let Ok(new_source) = parse_wim_file(path_str, false)
// Assuming all network sources are installers
{
wim_files.push(new_source);