Serial read code

This code is part of the library. Im not interfacing with computer, but DF robot bt401 bluetooth / usb / tf card mp3 player module.
I send AF+MF command to it and it`s response is MF+"filename"\n\r

My problem is that if I have a file with long name I get error1.