[Coco] Another MShell update and bug fix

Steven Hirsch snhirsch at gmail.com
Thu Oct 29 13:07:48 EDT 2015


On Thu, 29 Oct 2015, Bill Pierce via Coco wrote:

> The problem is in a cmd Aaron wrote specifically to solve a problem I 
> was having back when I was writing "DW4Man". It is a machine level cmd, 
> "xdir", that returns a series of packets when you request a dir listing 
> from the PC server. 1 packet per filename. The cmd works well in 
> windows, but Linux & Mac are sending something unexpected and it screws 
> up the cmd's data return. This cmd was implemented as an alternative to 
> a similar cmd that returned a text string instead binary formatted... 
> (Exmpl: 1 or 0 as opposed to "TRUE" or "FALSE"). The cmd was a quick fix 
> and we never got into testing it thoroughly at the time and it was not 
> discovered that it failed on Linux and Mac until I was working on MShell 
> a year or so later. The problem is that this packet returns 12 bytes of 
> info, then a filename and on Linux and Mac, certain files (not all) 
> return 14 or 16 bytes then the filename. I have no idea what the extra 
> bytes are or how to determine when it's actually sending extra bytes or 
> the normal count. I have a feeling it has something to do with 
> permissions on hidden or system files when the info is requested from 
> the server as the extra bytes seem to come right after the byte flagging 
> the "read only" attribute of the file.

I'm going to bet this is related to user and group id on Linux and Mac. 
FYI: There is no concept of a system or "hidden" file as such in Linux. 
By convention, many file viewing tools suppress filenames starting with 
'.', but this is only a convention and not enforced at all on the system 
level.  I suppose it's also possible that the underlying Java call to get 
filesystem information is getting ACL "extended" permissions on Linux and 
Mac.

I know Java quite well, having been forced to learn it for my day job. 
But, like most of us, I'm lacking on free time and not in a position to 
volunteer to chase this down.

Your work on MShell sounds interesting and I'm hoping to find time to take 
it for a test drive soon.


-- 


More information about the Coco mailing list