Re: Directories appearing as volume aliases in 10.3 Finder
At 15:50 +1000 7/4/04, Sam Vaughan wrote: Any ideas on workarounds for this would be terrific! Some thoughts... All of this stuff lives at the Carbon File Manager level, not the Finder. My guess is that any other Carbon client would have exactly the same problem. It would be worthwhile testing that guess by writing a simple Carbon tool that calls FSGetCatalogInfo and prints the results. This has a number of advantages. First, it lets you determine exactly what the problem is at the Carbon File Manager level. Second, you can do intensive debugging on your test program that would be inappropriate on the Finder. Looking at the code it seems that the Carbon File Manager is supposed to handle DT_UNKNOWN. If the type is unknown it's supposed to call lstat on the file and set the type based on that. The mechanism used by Carbon File Manager to emulate Carbon file system semantics on top of Posix volumes is quite complex. I don't really understand it too well myself yet. However, there are some interesting debugging facilities built in to Carbon File Manager. If you run GDB and attach to the Finder, you call call three routines to dump out Carbon File Manager state. (gdb) call (void)PrintVolumeInfo(0) This prints the volume list. The output will show up in Console. (gbb) call (void)PrintFileIDTree(-114) This prints the "file ID tree" for a specific volume (substitute the vRefNum for "-114" in the above command line). The file ID tree only exists for Posix volumes. It allows Carbon File Manager to implement "access by file ID" semantics on volumes that don't support it (that is, Posix volumes, that is, volumes that don't support volfs). The output will look something like this: 2 "UFS Victim" (02) . 27 "CStarter.c" (01) . 25 "Proto-Answer" (01) . 18 ".Trashes" (02) . . 22 "501" (02) The first number is the Carbon file ID for the node. The string in quotes is the node name. The number in brackets is the node type (0 = unknown, 1 = file, 2 = directory, 3 = link). The dots indicate directory nesting. (gdb) call (void)PrintEnumerationCache(-114) This prints Carbon File Manager's directory enumeration cache. I'm not sure how you can use this information for this specific problem, but I'm sure you'll find it useful. S+E -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Technical Support * Networking, Communications, Hardware _______________________________________________ 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)
-
Quinn