Skip to content

Commit

Permalink
Update filer.c
Browse files Browse the repository at this point in the history
  • Loading branch information
israpps authored Feb 11, 2024
1 parent dcf75bf commit 85a94b2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/filer.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,16 @@ void pad_psu_header(psu_header *psu)
}
// functions below are all related to noob-helper checks on COH models
#ifdef SUPPORT_SYSTEM_2X6
///dongleguard
/// checks if the file about to be touched is a security dongle boot file.
/// if it is, prompts the user to confirm the operation before proceeding.
/// returns 0 if user wants to proceed. returns nonzero if user does not want to proceed or the file is not a boot file
int dongleguard(char *filepath) {
if (!strcmp(filepath, "mc0:boot.bin") {
if (ynDialog("you're about to delete/rename/move the security dongle boot file\ndont do this uf you don't know what it is\n\nContinue?") > 0) {
return 0;
} else {return 2;}
} else {return 1; /*not a dongle boot file*/}
if (ynDialog("you're about to delete/rename/move the security dongle boot file\ndont do this if you don't know what it is\n\nContinue?") > 0) {
return 2;
} else {return 0;}
} else {return 1;} /*not a dongle boot file*/}
}
#endif
//--------------------------------------------------------------
Expand Down

0 comments on commit 85a94b2

Please sign in to comment.