Add pre-update/clean backup feature
All checks were successful
Build / Build (push) Successful in 12s
All checks were successful
Build / Build (push) Successful in 12s
- 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>
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#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);
|
||||
@@ -16,3 +18,6 @@ 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, ...);
|
||||
|
||||
Reference in New Issue
Block a user