diff --git a/src/filer.c b/src/filer.c index 71aa8e10..92297bb8 100644 --- a/src/filer.c +++ b/src/filer.c @@ -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 //--------------------------------------------------------------