This worked for me:Use CubeMX V1.7I needed long names for my project so additional were requiredIn file ff.c change *lfname to lfname[_MAX_LFN]If the function f_readdir(&dir, &fno) is called in the project just before it I added fno.lfsize = _MAX_LFN