Clean install: use normal switch copy, not .offload-aware
All checks were successful
Build / Build (push) Successful in 14s

- update_mode_install(variant, offload_aware_switch): true = update (preserve .offload), false = clean
- Update path calls with true; clean_mode_install calls with false so switch/ is copied normally on fresh install

Made-with: Cursor
This commit is contained in:
2026-03-01 15:15:45 +01:00
parent b0523ada6c
commit 335ea03b05
4 changed files with 12 additions and 7 deletions

View File

@@ -73,8 +73,9 @@ int update_mode_cleanup(omninx_variant_t variant) {
return FR_OK;
}
// Update mode: Copy files from staging
int update_mode_install(omninx_variant_t variant) {
// Update/Clean mode: Copy files from staging.
// offload_aware_switch: true = update (preserve .overlays/.offload, .packages/.offload); false = clean (normal copy).
int update_mode_install(omninx_variant_t variant, bool offload_aware_switch) {
int res;
const char* staging = get_staging_path(variant);
char src_path[256];
@@ -103,7 +104,10 @@ int update_mode_install(omninx_variant_t variant) {
if (res != FR_OK && res != FR_NO_FILE) return res;
s_printf(src_path, "%s/switch", staging);
res = folder_copy_switch_update_offload_aware(src_path, "sd:/", "switch/");
if (offload_aware_switch)
res = folder_copy_switch_update_offload_aware(src_path, "sd:/", "switch/");
else
res = folder_copy_with_progress_v2(src_path, "sd:/", "switch/");
if (res != FR_OK && res != FR_NO_FILE) return res;
s_printf(src_path, "%s/warmboot_mariko", staging);