mirror of
https://github.com/CTCaer/hekate.git
synced 2024-12-25 15:17:19 +00:00
nyx: tools: improve error messaging when restore folder is empty
This commit is contained in:
parent
f231173ebe
commit
cd5b93feb1
@ -379,7 +379,7 @@ static int _dump_emmc_part(emmc_tool_gui_t *gui, char *sd_path, int active_part,
|
|||||||
_get_valid_partition(§or_start, §or_size, &part_idx, true);
|
_get_valid_partition(§or_start, §or_size, &part_idx, true);
|
||||||
if (!part_idx || !sector_size)
|
if (!part_idx || !sector_size)
|
||||||
{
|
{
|
||||||
s_printf(gui->txt_buf, "#FFDD00 Failed to find a partition...#\n");
|
s_printf(gui->txt_buf, "\n#FFDD00 Failed to find a partition...#\n");
|
||||||
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
||||||
manual_system_maintenance(true);
|
manual_system_maintenance(true);
|
||||||
|
|
||||||
@ -995,18 +995,30 @@ static int _restore_emmc_part(emmc_tool_gui_t *gui, char *sd_path, int active_pa
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (f_stat(outFilename, &fno) && !gui->raw_emummc)
|
else if (f_stat(outFilename, &fno))
|
||||||
{
|
{
|
||||||
s_printf(gui->txt_buf, "#FFDD00 Error (%d) file not found#\n#FFDD00 %s.#\n\n", res, outFilename);
|
if (!gui->raw_emummc)
|
||||||
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
{
|
||||||
manual_system_maintenance(true);
|
s_printf(gui->txt_buf, "#FFDD00 Error (%d) file not found#\n#FFDD00 %s.#\n\n", res, outFilename);
|
||||||
|
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
||||||
|
manual_system_maintenance(true);
|
||||||
|
|
||||||
// Attempt a smaller restore.
|
// Attempt a smaller restore.
|
||||||
break;
|
if (numSplitParts)
|
||||||
}
|
break;
|
||||||
else if (f_stat(outFilename, &fno) && gui->raw_emummc)
|
}
|
||||||
{
|
else
|
||||||
totalSectors = (u32)((u64)totalCheckFileSize >> (u64)9);
|
totalSectors = (u32)((u64)totalCheckFileSize >> (u64)9);
|
||||||
|
|
||||||
|
// Restore folder is empty.
|
||||||
|
if (!numSplitParts)
|
||||||
|
{
|
||||||
|
s_printf(gui->txt_buf, "#FFDD00 Restore folder is empty.#\n\n");
|
||||||
|
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
||||||
|
manual_system_maintenance(true);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user