[jcifs] Printers showing up as TYPE_SHARE

Michael B Allen mba2000 at ioplex.com
Wed Jun 8 03:21:56 GMT 2005


Michael Kerley said:
> Hi,
> I found that when I use the SmbFile.listFiles() method at the server
> level,
> all of the returned files have the TYPE_SHARE type, even if they're
> actually
> printers or named pipes.
>
> I combined the jCIFS standard List and GetType examples to make a
> ListWithTypes program.  Using that program, if I do this:
>
>   java ListWithTypes smb://MyComputer/
>
> The result looks like this:
>
>   share1     TYPE_SHARE
>   share2     TYPE_SHARE
>   share3     TYPE_SHARE
>   printer1   TYPE_SHARE
>   IPC$       TYPE_SHARE
>

This is a bug. I'm not certain if your fix is right. But if it works for
all types (including TYPE_WORKGROUP and TYPE_SERVER) then it probably is.
I need to look at it further.

Nice catch,
Mike


More information about the jcifs mailing list