You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Stephen Charles Huey <st...@fastmail.fm> on 2004/08/26 20:40:15 UTC

FTPClient corrupting zip files?

We've got a bad problem with a zip file we're trying to upload using
FTPClient.  We're not even sure it's with FTPClient, but it's one of the
two possibilities.  Basically, when we upload a zip file to the FTP
server, then someone on that end gets an error when trying to extract it
with pkunzip:

extra 137 bytes at beginning or within Zip file (attempting to process
anyway)
Error in file #1:  bad Zip file offset (Error local header signature not
found):  0
(attempting to re-compensate)
Extracting BG040825.NAS
Error:  invalid compressed data to inflate


They don't get this error when we upload the zip file via some other
means.  Is there any chance that FTPClient could be adding extra bytes
to the file?  Here is my relevant code:


in = new FileInputStream(toUpload);
ftpClient.storeFile(toUpload.getName(), in);
in.close();


Nothing crazy!  And I'm catching FTPConnectionClosedException and
IOException.  Any ideas?  

Thanks,
Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org