mirror of
https://github.com/CTCaer/hekate.git
synced 2024-12-27 21:19:20 +00:00
nyx: use restore/emummc folder for restoring
In order to avoid mistakes, emuMMC can now only be restored from `backup/{emmc_sn}/restore/emummc`.
This commit is contained in:
parent
cb964fe5d2
commit
91393700ff
@ -778,6 +778,7 @@ void dump_emmc_selected(emmcPartType_t dumpType, emmc_tool_gui_t *gui)
|
||||
char sdPath[OUT_FILENAME_SZ];
|
||||
// Create Restore folders, if they do not exist.
|
||||
emmcsn_path_impl(sdPath, "/restore", "", &emmc_storage);
|
||||
emmcsn_path_impl(sdPath, "/restore/emummc", "", &emmc_storage);
|
||||
emmcsn_path_impl(sdPath, "/restore/partitions", "", &emmc_storage);
|
||||
|
||||
// Set folder to backup/{emmc_sn}.
|
||||
@ -1431,8 +1432,10 @@ void restore_emmc_selected(emmcPartType_t restoreType, emmc_tool_gui_t *gui)
|
||||
|
||||
int i = 0;
|
||||
char sdPath[OUT_FILENAME_SZ];
|
||||
|
||||
emmcsn_path_impl(sdPath, "/restore", "", &emmc_storage);
|
||||
if (!gui->raw_emummc)
|
||||
emmcsn_path_impl(sdPath, "/restore", "", &emmc_storage);
|
||||
else
|
||||
emmcsn_path_impl(sdPath, "/restore/emummc", "", &emmc_storage);
|
||||
gui->base_path = (char *)malloc(strlen(sdPath) + 1);
|
||||
strcpy(gui->base_path, sdPath);
|
||||
|
||||
@ -1464,7 +1467,10 @@ void restore_emmc_selected(emmcPartType_t restoreType, emmc_tool_gui_t *gui)
|
||||
|
||||
emmc_set_partition(i + 1);
|
||||
|
||||
emmcsn_path_impl(sdPath, "/restore", bootPart.name, &emmc_storage);
|
||||
if (!gui->raw_emummc)
|
||||
emmcsn_path_impl(sdPath, "/restore", bootPart.name, &emmc_storage);
|
||||
else
|
||||
emmcsn_path_impl(sdPath, "/restore/emummc", bootPart.name, &emmc_storage);
|
||||
res = _restore_emmc_part(gui, sdPath, i, &emmc_storage, &bootPart, false);
|
||||
|
||||
if (!res)
|
||||
@ -1530,7 +1536,10 @@ void restore_emmc_selected(emmcPartType_t restoreType, emmc_tool_gui_t *gui)
|
||||
manual_system_maintenance(true);
|
||||
i++;
|
||||
|
||||
emmcsn_path_impl(sdPath, "/restore", rawPart.name, &emmc_storage);
|
||||
if (!gui->raw_emummc)
|
||||
emmcsn_path_impl(sdPath, "/restore", rawPart.name, &emmc_storage);
|
||||
else
|
||||
emmcsn_path_impl(sdPath, "/restore/emummc", rawPart.name, &emmc_storage);
|
||||
res = _restore_emmc_part(gui, sdPath, 2, &emmc_storage, &rawPart, true);
|
||||
|
||||
if (!res)
|
||||
|
Loading…
Reference in New Issue
Block a user