[jcifs] Problems with Attribute-caching after copyTo

Michael B Allen ioplex at gmail.com
Mon Jul 14 16:35:17 GMT 2008


On 7/14/08, Weber, Mirko <Mirko.Weber at siltronic.com> wrote:
>
>
>
> Hello,
>
> we are using a methode, where we first check if a destination file exists,
> then copy from source to destination with the SmbFile.copyTo-methode and
> then check again if the destination exists. In the common case, that
> destination at the beginning not exists and the copying works without error
> (and fast enough) the second call to destination.exists() gives the wrong
> answer (false instead of right).
>
> I think the copyTo-method should reset the attrExpiration of the destination
> file, like other funktions.

Yes. I will add this to the TODO list.

> Maybe there are also other tasks in the api with
> a similar behavior that should reviewt?

If you create a separate SmbFile object the  behavior will be correct.

Although, if the copyTo method returns successfully there should be no
reason to check it.

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/


More information about the jcifs mailing list