jlaffaye / ftp

FTP client package for Go
ISC License
1.28k stars 358 forks source link

STOR method isn't be able to upload empty file #362

Open edugamo1993 opened 7 months ago

edugamo1993 commented 7 months ago

Hi,

In my test code, i am trying to upload an empty file: err = f.conn.Stor(f.currentFile, bytes.NewReader([]byte("")))

But returns (unexpected EOF) when the StorFrom method tries to read ftp response, here:

_, _, err = c.conn.ReadResponse(StatusClosingDataConnection)

Could you please help me?

Thanks