Problems with Attribute-caching after copyTo

View: New views
2 Messages — Rating Filter:   Alert me  

Problems with Attribute-caching after copyTo

by Weber, Mirko :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Problems with Attribute-caching after copyTo

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. Maybe there are also other tasks in the api with a similar behavior that should reviewt?

Thanks and kind regards,
Mirko

PS: Please take me cc at answering. I am not subscibt right now. Thanks.


Mirko Weber
Computer Integrated Manufacturing Freiberg
INFORMATION TECHNOLOGY
Siltronic AG
Berthelsdorferstrasse 113
09599 Freiberg, Germany
Tel. +49 3731 278-7271
mirko.weber@...

SILTRONIC
PERFECT SILICON SOLUTIONS

This communication and any files or attachments transmitted with it may contain information that is copyrighted or confidential and exempt from
disclosure under applicable law. It is intended solely for the use of the individual or the entity to which it is addressed.
If you are not the intended recipient, you are hereby notified that any use, dissemination, or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify us at once so that we may take the appropriate action and avoid troubling you further.
Thank you for your cooperation. Please contact your local IT staff or email info@... if you need assistance.


Re: Problems with Attribute-caching after copyTo

by Michael B Allen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 7/14/08, Weber, Mirko <Mirko.Weber@...> 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/