Hello, I want to bypass delete confirmation in other words trigger delete command without confirmation. How can I do this? Full code is in the attachment.
Code:/* share code for file and directory deletion, saves space */ static int delete_file_dir(void) { if (confirm_delete(selected_file) != YESNO_YES) { return 1; } clear_display(true); splash(HZ/2, str(LANG_DELETING)); int rc = -1; if (selected_file_attr & ATTR_DIRECTORY) { /* true if directory */ struct dirrecurse_params parm; parm.append = strlcpy(parm.path, selected_file, sizeof (parm.path)); if (parm.append < sizeof (parm.path)) { cpu_boost(true); rc = remove_dir(&parm); cpu_boost(false); } } else { rc = remove(selected_file); } if (rc < OPRC_SUCCESS) { splash_failed(LANG_DELETE); } else if (rc == OPRC_CANCELLED) { splash_cancelled(); } if (rc != OPRC_NOOP) { /* Could have failed after some but not all needed changes; reload */ onplay_result = ONPLAY_RELOAD_DIR; } return 1; }