Files
niklascfw 89994995af
All checks were successful
Build / Build (push) Successful in 12s
Add pre-update/clean backup feature
- Backup deletion paths before update to sd:/backup/OmniNX/{version}
- Backup deletion paths before clean install to sd:/backup/OmniNX/pre-omninx
- Best-effort backup: continue install even if some copies fail
- Fix directory creation: ensure parent dirs exist before folder_copy
- Step 1 for update: Backup; Step 1-2 for clean: user data + pre-omninx backup

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 16:05:57 +01:00

24 lines
656 B
C

/*
* OmniNX Installer - Backup and Restore Operations
* For preserving user data during clean installs
*/
#pragma once
#include <utils/types.h>
#define TEMP_BACKUP_PATH "sd:/temp_backup"
#define BACKUP_BASE_PATH "sd:/backup/OmniNX"
#define PRE_OMNINX_LABEL "pre-omninx"
// Backup user data (DBI, Tinfoil, prod.keys) before clean install
int backup_user_data(void);
// Restore user data after clean install
int restore_user_data(void);
// Clean up temporary backup directory
int cleanup_backup(void);
// Backup paths from varargs lists to backup_base (pass path arrays, terminate with NULL)
int backup_deletion_lists(const char *backup_base, ...);