[jcifs] [SOLVED] Re: Problem with method SmbFile.exists() in jcifs-0.6b3

Michael B.Allen mballen at erols.com
Sat Dec 15 20:46:27 EST 2001

On Sat, 15 Dec 2001 10:49:52 +0200
"Tsvetan Nachev" <ts_nachev at prosyst.bg> wrote:

> Hello Michael,
> I appreciate your work and I believe you will fix this strange behaviour of
> jcifs soon.
> The testing I have done yesterday ( Fri 14.12.2001 ) I found that this
> problem occurs when before calling exists() method you call isFile() for the
> same smbFile. The opposite - calling exists() and then isFile() works just
> fine. This is by now what I have found. I hope it will be useful to you.

Oh crud. I should read my e-mail more frequently. This is exectly right
Tsvetan. The exists() method was checking the attrExpirationPeriod which
would cause it to return false if any of the updateAttributes() calling
methods were called beforehand (I know you don't know what I'm talking
about, this is all internals :~). Rob and I would have had this figured
out shortly after it was noticed had it not been for *another* bug in how
the default attrExpirationPeriod was initialized. Setting
attrExpirationPeriod=0 would have worked. The real fix however is to
remove the attrExpirationPeriod check at the beginning of exists(). It
should not have been there at all!

Oh, well, it's fixed along with quite a few other much smaller bugs. I'll
build a new package tomarrow.

Good catch Tsvetan,

May The Source be with you.

More information about the jcifs mailing list