I noticed this error trying to transfer from my Linux PC to my Android smartphone a file named '1a_Orléans->Meung-sur-Loire (19km).gpx', which is a legit filename under Linux.
I don't know if this behaviour is intended or not, but anyway the error message 'unexpected end of stream' is somewhat misleading and the user could never suspect to be hitting against a (undocumented?) constraint on filenames.
Pixel 7a; Android 16; FTP Server 3.1 - 30100 (16-36)
Thanks