spoof events on libfuse hidden files, or use top-level hidden directory #78
Description
Because we do not, at present, enable the hard_remove
libfuse option, when a file is renamed or deleted while a process has an open file descriptor for it, the file is actually just renamed as .fuse_hidden...
until the handle is removed.
This has two consequences -- one is that we deliver PROJFS_MOVE*
and PROJFS_DELETE*
events on the hidden filename, and the other is that the hidden file then prevents further actions, such as deletion of the parent directory.
We should consider spoofing events such that we do not deliver them for .fuse_hidden...
files, and instead report PROJFS_DELETE*
events from the rename()
file op when the file is being renamed to a hidden filename, while noting this is insufficient to allow further operations such as deletion of the parent directory -- which may manifest in directories "left over" after a git checkout
while using VFSForGit.
An alternative would be to investigate how to make libfuse instead place the hidden file in a directory at the top of the filesystem, e.g., in <mount point>/.fuse_hidden/
. We could also deliberately hide that directory from the clients, if desired.