jgoerzen / ftphs

FTP client and server library [Haskell]
http://wiki.github.com/jgoerzen/ftphs/
GNU Lesser General Public License v2.1
16 stars 16 forks source link

Fixed issues in transfering file in binary mode #7

Open abaw opened 10 years ago

abaw commented 10 years ago

Hi John, I was to implement some FTP server thing and found ftphs. But I found transferring files in binary mode didn't work in my environment(CentOS 6.4). This is because vGetContents/hGetContents does not work with binary files if the byte sequence could not be decoded into Char. So I tried to fix it and here is the result, please take a look. Thanks.

P.S. I tried to follow the coding style carefully, but I am a Haskell newbie, there might be some non-idiomatic code.

Regards,

Ken