GetFile corrupting .jar

Jun 18, 2013 at 4:26 AM
I am currently using this library to make a Minecraft client patcher for my forge server. Everytime I download minecraft.jar from my server, it gets corrupted. I am not planning to keep this file in the download, but I would like to know why this is happening, and does it affect the other .jars that are distributed?
Jun 18, 2013 at 4:46 AM
Just tried a few other .jars and got the same result. They all cease to function correctly.
Jun 23, 2013 at 2:26 AM
Might you be in TEXT transfer mode instead of BINARY? In TEXT mode you may have some conversion of CR/LF characters which would break a binary file.
Jun 23, 2013 at 2:34 AM
Err.. the library is binary by default is it not?
Jun 23, 2013 at 2:53 AM
I just started playing with it 45 minutes ago... dunno if binary by default.
Jun 23, 2013 at 2:55 AM
Edited Jun 23, 2013 at 2:55 AM
int ret = WININET.FtpGetFile(_hConnect,
                 remoteFile,
                 localFile,
                 failIfExists,
                 WINAPI.FILE_ATTRIBUTE_NORMAL,
                 WININET.FTP_TRANSFER_TYPE_BINARY,
                 IntPtr.Zero);
right from the source
Jun 23, 2013 at 3:34 AM
Well, if that's not it... I guess I'd look at both versions of the file in a hex editor and see what's different.
Jun 23, 2013 at 4:10 AM
Just did, the files show no difference. Yet the one my app downloads does not function correctly.

It's minecraft.jar, as I said. I only get the error on the one my app downloaded, yet VBinDiff didn't find anything different.