commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Charles Huey" <stephenh...@fastmail.fm>
Subject FTPClient corrupting zip files?
Date Thu, 26 Aug 2004 18:40:15 GMT
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


Mime
View raw message