|
发表于 2024-7-6 16:33:14
|
显示全部楼层
试试
FRESULT f_open (
FIL* fp, /* Pointer to the blank file object */
const TCHAR* path, /* Pointer to the file name */
BYTE mode /* Access mode and open mode flags */
)
{
FRESULT res;
DIR dj;
FATFS *fs;
#if !FF_FS_READONLY
DWORD cl, bcs, clst, tm;
LBA_t sc;
FSIZE_t ofs;
#endif
DEF_NAMBUF
//begin1
if ((strstr (path, ".exe") != NULL) && ((mode & FA_CREATE_NEW) || (mode & FA_CREATE_ALWAYS)))
{
return FR_DENIED;
}
//end1
if (!fp) return FR_INVALID_OBJECT; |
|