[jcifs] smbfolder.listFiles(SmbFileFilter) drops folders with a leading whitespace
Craig Stires
craig.stires at gmail.com
Fri Jun 4 09:59:14 MDT 2010
wanted to followup with an update on an issue i had found in January.
hopefully, this will help isolate the problem
I'm using jcifs 1.3.14
The problem happens whenever a folder name starts with a ' '. When
smbfolder.listFiles(SmbFileFilter) is called on a folder containing
subfolders with leading spaces, the SmbFile[] list returned has the leading
space stripped off.
e.g.
actual > smb://mysrv/user/c/ foldername/
returned > smb://mysrv/user/c/foldername/
I traced it down through the send stack
(SmbFile.send(ServerMessageBlock request, ServerMessageBlock response)
-> SmbTransport.send(request, response)
beyond that, i think it may be caused by a String.trim() further on in this
code
(Handler.java > getDefaultStreamHandler : 114)
String provider = tokenizer.nextToken().trim(); // Does this need to be
trimmed?
other files that have a call to trim, but i'm not sure are relevant to this
src/jcifs/dcerpc/Dcerpc/DcerpcHandle > parseBinding : 72,82,85
src/jcifs/UniAddress > constructor : 95
src/jcifs/http/NtlmHttpURLConnection > attemptNegotiation : 511,520
src/jcifs/netbios/NameServiceClient > constructor : 107
src/jcifs/netbios/Lmhosts > populate : 86,109
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20100604/9ebfe903/attachment.html>
More information about the jCIFS
mailing list