Re: Directories appearing as volume aliases in 10.3 Finder
I checked the fields we return from stat/lstat on a directory and they look OK when compared to HFS+. I then compared getdirentries output and suddenly remembered that we return a type of DT_UNKNOWN for everything. The reason for this is that we simply don't know what type the items are in vop_readdir. (IRIX doesn't have a type field in its dirent struct, Solaris doesn't either I'm told) A quick grep on xnu for DT_UNKNOWN shows that we're not the only ones doing this. See bsd/isofs/cd9660/cd9660_vnops.c for a good example. Running a ktrace on the Finder shows that it's doing lstats on the items in the directory after it does a getdirentries call, so you'd think it could correctly work out what the unknown items are. Presumably that's what Jaguar did because we had no issues there. For a laugh I tried returning DT_DIR for everything but quickly panicked due to a locking issue. I then tried DT_REG and sure enough all the dirs appeared in the Finder as files. So from this I'm concluding that the 10.3 Finder is more interested in the d_type field in the dirent than checking whether the S_IFDIR/S_ISDIR bit is set in the st_mode field of the stat structure. Any ideas on workarounds for this would be terrific! Thanks, Sam On 07/04/2004, at 9:39 AM, Sam Vaughan wrote: The 10.3 Finder is displaying directories in our file systems as aliases to network volumes. _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Sam Vaughan