[jcifs] small caching bug with jcifs

Thomas Fromm tf at inubit.com
Thu Jun 4 17:02:58 GMT 2009


Hi,

I wasn't able to find the link to your bug tracking tool at your homepage :-/.
(Is there one?)

So I decided to post it here.

I recognized, that the length and maybe also the lastModified values of a 
SmbFile are not updated, after using an (appending) output stream.

e.g.:
SmbFile file=new SmbFile("smb://...");

OutputStream os=new SmbFileOutputStream(file);
os.write(0);
os.close();

// at this point, the file.length() is '1'

// now append data
os=new SmbFileOutputStream(file, true);
os.write(data);
os.close();

// now the file.length() is still '1' but should be '2'

Maybe you can update the size member of the SmbFile object during or at the 
end of the writeDirect, or reset the expire time of it.

Thanks in advance,
--tf





More information about the jcifs mailing list