[jcifs] Problems with SmbFile.copyTo()
Michael B Allen
mba2000 at ioplex.com
Tue Oct 10 16:16:45 GMT 2006
Yes that's a bug. It was probably introduced with that "big
try-catch". Take out the catch and replace it with a finally like:
1974 dest.close( 0L );
1975 } finally {
1976 close();
1977 }
Let us know how it goes either way.
Thanks,
Mike
On Tue, 10 Oct 2006 17:11:11 +0200
aschlett at web.de wrote:
> Hi,
> another problem:
> I'm copying a file using copyTo() and delete it after. If on the target directory access is denied, I don't get an exception,
> but the following delete call fails because the source file is still open. I looked at SmbFile.java and found that
> copyTo0() has a big try-catch block catching all exceptions, printing them (only in debug mode!) and not closing the source file.
> I think this part is just a big bug, file is not closed, caller doesn't get any information etc.
> Did anyone work on this already? Is this intended behavior? I don't have deep enough knowledge of JCifs to offer a patch,
> but I will change the code for our project to avoid all this.
> Alex
> _______________________________________________________________________
> Viren-Scan für Ihren PC! Jetzt für jeden. Sofort, online und kostenlos.
> Gleich testen! http://www.pc-sicherheit.web.de/freescan/?mc=022222
>
--
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/
More information about the jcifs
mailing list