[jcifs] SmbFile.listFiles() bug in 0.8.x
Gary Rambo
grambo at aventail.com
Mon Mar 8 23:13:44 GMT 2004
Replacing the code at ll. 1465 of SmbFile.java:
SmbFile f = new SmbFile( this, name,
listType == 0 ? TYPE_WORKGROUP : listType,
ATTR_READONLY | ATTR_DIRECTORY, 0L, 0L, 0L );
with
SmbFile f = null;
if( listType == TYPE_WORKGROUP )
f = new SmbFile( "smb://" + name + "/" );
else
f = new SmbFile( this, name,
listType == 0 ? TYPE_WORKGROUP : listType,
ATTR_READONLY | ATTR_DIRECTORY, 0L, 0L, 0L );
seems to fix this.
Gary
Michael Kerley wrote:
> If I use SmbFile.listFiles() to get the list of computers in a
> domain/workgroup, and call getCanonicalPath() on the returned SmbFile
> objects, I get names like these:
> smb://thedomain/computer1/
> smb://thedomain/computer2/
>
> In jCFIS 0.7.x, I used to get results like these:
> smb://computer1/
> smb://computer2/
>
> I can provide a code example if this doesn't make sense.
>
> Thanks,
> Michael Kerley
>
--
Gary Rambo
Aventail Corporation
Secure access for the real world.
www.aventail.com
More information about the jcifs
mailing list