forked from Mirror/GodMode9
Add a warning disclaimer when first running scripts
This commit is contained in:
parent
754efbf112
commit
61712ce1fb
@ -1201,6 +1201,9 @@ u32 FileHandlerMenu(char* current_path, u32* cursor, u32* scroll, DirStruct* cur
|
||||
}
|
||||
return 0;
|
||||
} else if ((user_select == script)) {
|
||||
static bool show_disclaimer = true;
|
||||
if (show_disclaimer) ShowPrompt(false, "Warning: Do not run scripts\nfrom untrusted sources.");
|
||||
show_disclaimer = false;
|
||||
if (ShowPrompt(true, "%s\nExecute script?", pathstr))
|
||||
ShowPrompt(false, "%s\nScript execute %s", pathstr, ExecuteGM9Script(curr_entry->path) ? "success" : "failure");
|
||||
GetDirContents(current_dir, current_path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user