DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=40074>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40074 Summary: get task for apache ant discards parts of files Product: Slide Version: 2.1 Platform: All OS/Version: All Status: NEW Keywords: APIBug, PatchAvailable Severity: critical Priority: P1 Component: WebDAV client AssignedTo: slide-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] The ant task to get files from a webdav repository discards parts of files. This has something to do with the InputStream.available which might 0 whenever there's still data available in the stream so the remaining data is discarded. I created a fix by using WebdavResource, which works fine but, because I was in a hurry, it's a little dirty. Below you'll find the fix. private void getAndStoreResource(HttpURL url, File target)throws IOException,IOException,FileNotFoundException{ File directory = target.getParentFile(); if(!directory.exists()) directory.mkdirs(); url.setUserinfo(userid,password); WebdavResource webdavResource = Utils.getWebdavResource(url); log("Downloading '" +url.getURI()); if (webdavResource.getMethod(target)) { log("succeeded."); countWrittenFiles++; } else { log("failed."); log(webdavResource.getStatusMessage()); } webdavResource.close(); } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]