[jcifs] Printers showing up as TYPE_SHARE

Michael B Allen mba2000 at ioplex.com
Mon Jun 27 22:56:57 GMT 2005


This is fixed in 1.2.1 to be released RSN.

Michael B Allen said:
> 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