mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-22 18:06:40 +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
1 changed files with 13 additions and 4 deletions
|
@ -778,6 +778,7 @@ void dump_emmc_selected(emmcPartType_t dumpType, emmc_tool_gui_t *gui)
|
||||||
char sdPath[OUT_FILENAME_SZ];
|
char sdPath[OUT_FILENAME_SZ];
|
||||||
// Create Restore folders, if they do not exist.
|
// Create Restore folders, if they do not exist.
|
||||||
emmcsn_path_impl(sdPath, "/restore", "", &emmc_storage);
|
emmcsn_path_impl(sdPath, "/restore", "", &emmc_storage);
|
||||||
|
emmcsn_path_impl(sdPath, "/restore/emummc", "", &emmc_storage);
|
||||||
emmcsn_path_impl(sdPath, "/restore/partitions", "", &emmc_storage);
|
emmcsn_path_impl(sdPath, "/restore/partitions", "", &emmc_storage);
|
||||||
|
|
||||||
// Set folder to backup/{emmc_sn}.
|
// 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;
|
int i = 0;
|
||||||
char sdPath[OUT_FILENAME_SZ];
|
char sdPath[OUT_FILENAME_SZ];
|
||||||
|
if (!gui->raw_emummc)
|
||||||
emmcsn_path_impl(sdPath, "/restore", "", &emmc_storage);
|
emmcsn_path_impl(sdPath, "/restore", "", &emmc_storage);
|
||||||
|
else
|
||||||
|
emmcsn_path_impl(sdPath, "/restore/emummc", "", &emmc_storage);
|
||||||
gui->base_path = (char *)malloc(strlen(sdPath) + 1);
|
gui->base_path = (char *)malloc(strlen(sdPath) + 1);
|
||||||
strcpy(gui->base_path, sdPath);
|
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);
|
emmc_set_partition(i + 1);
|
||||||
|
|
||||||
|
if (!gui->raw_emummc)
|
||||||
emmcsn_path_impl(sdPath, "/restore", bootPart.name, &emmc_storage);
|
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);
|
res = _restore_emmc_part(gui, sdPath, i, &emmc_storage, &bootPart, false);
|
||||||
|
|
||||||
if (!res)
|
if (!res)
|
||||||
|
@ -1530,7 +1536,10 @@ void restore_emmc_selected(emmcPartType_t restoreType, emmc_tool_gui_t *gui)
|
||||||
manual_system_maintenance(true);
|
manual_system_maintenance(true);
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
|
if (!gui->raw_emummc)
|
||||||
emmcsn_path_impl(sdPath, "/restore", rawPart.name, &emmc_storage);
|
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);
|
res = _restore_emmc_part(gui, sdPath, 2, &emmc_storage, &rawPart, true);
|
||||||
|
|
||||||
if (!res)
|
if (!res)
|
||||||
|
|
Loading…
Reference in a new issue