site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Aug 26, 2006, at 12:02 PM, darwin-dev-request@lists.apple.com wrote: I am seeing a strange behaviour sometimes when mounting afp network volumes on an Intel iMac. Essentially the OS is creating more than one /Volumes representation for the drive, depending on what steps have occurred, and its creating a persistent entry in /Volumes which I can't 'unmount' For example: I have another Mac sharing its hard disc. This volume is called "G4_HD". When I try to mount it on the iMac, it ends up being referred to as G4_HD-1 by Unix (in /Volumes). This is because there is already a 'persistent' entry in /Volumes called 'G4_HD' from some earlier life. This persistent entry only contains one of the directories which belong to the volume. The fact that it contains another directory is a giveaway; what has happened is that the volume has been unmounted at the same time that an application has decided that it is going to create (e.g.) /Volumes/G4_HD/SomeFolder/SomeDocument and the application has stupidly assumed that it should create *any* intervening directories (it may even have asked the user) along the way. As the volume was unmounted, /Volumes/G4_HD ceased to exist, and so the application created it again. The problem I have is that I am using file:///Volumes/Drive/Folder/File style URLs to pass pointers to files over a network connection. When I use CFURL to resolve a URL like: file:///Volumes/G4_HD/folder/file So, I have 2 questions: 1) What is this phantom directory ? It's a directory. a) delete it b) find and either fix or avoid the application that created it = Mike _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... The problem isn't caused by you mounting them; it's an interaction between unmounting them and an application bug. The OS didn't create it, and you can't "unmount" it because it's a directory (folder). As you can see, this is an inherently fragile way to do things. Even without the bug discussed above, I can't recommend this as a way to go. 2) How do I solve my problem and avoid this in the field ? This email sent to site_archiver@lists.apple.com
participants (1)
-
Michael Smith