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

@@ -764,7 +764,7 @@ int perform_installation(omninx_variant_t pack_variant, install_mode_t mode) {
install_set_color(COLOR_YELLOW);
gfx_printf("Schritt 2: Dateien kopieren...\n");
install_set_color(COLOR_WHITE);
res = update_mode_install(pack_variant);
res = update_mode_install(pack_variant, true);
if (res != FR_OK) return res;
install_check_and_clear_screen_if_needed();

View File

@@ -18,7 +18,8 @@ int perform_installation(omninx_variant_t pack_variant, install_mode_t mode);
// Update mode operations (install_update.c)
int update_mode_cleanup(omninx_variant_t variant);
int update_mode_install(omninx_variant_t variant);
/* offload_aware_switch: true = update (preserve .offload), false = clean (normal copy) */
int update_mode_install(omninx_variant_t variant, bool offload_aware_switch);
int cleanup_staging_directory(omninx_variant_t pack_variant);
// Remove other OmniNX staging directories (Standard/Light/OC) that exist, except the one just installed
int cleanup_other_staging_directories(omninx_variant_t installed_variant);

View File

@@ -107,9 +107,9 @@ int clean_mode_restore(void) {
return res;
}
// Clean mode: Install files (reuse update mode install)
// Clean mode: Install files (reuse update copy logic, but normal switch copy no .offload preservation)
int clean_mode_install(omninx_variant_t variant) {
return update_mode_install(variant);
return update_mode_install(variant, false);
}
// Remove other staging directories (OmniNX Standard/Light/OC) that exist on SD

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);