I'm creating a MacFUSE filesystem for adding HFS write support to Mac OS X Snow Leopard, and it mostly works, but the system creates .Spotlight-V100
and .Trashes
directories on the mountpoint in /Volumes
before the volume is actually mounted, so those two directories stay there after the volume is unmounted, which prevents the mountpoint from being deleted. Successive mounts of the same disk create new mountpoints in /Volumes with sequential numbers (/Volumes/Disk, /Volumes/Disk 1, /Volumes/Disk 2, etc), this leads to /Volumes being filled with lots of useless directories unless they are deleted manually.
This happens wether I mark the volume as local or not, with fuse_opt_add_arg(&args, "-olocal");
How can I avoid this?
My source code is at http://vc.namedfork.net/nf/fusehfs/trunk/, the filesystem bundle is installed as /System/Library/Filesystems/fusefs_hfs.fs
, and the mounting is done with a fuse_wait wrapper, like fuse-ext2 and ntfs-3g