Func (o *Object) Remove() not always triggered


I try to create a new remote, which is based on the “union” remote.
The difference is, that all file operations should be done on all remote. Only write events (of files) should be done on the remote with highest priority.

Functions like Rmdir, DirMove, … are working without issues. But I have the problem, that *Object functions are not always triggered.

For example when try deleting a file, I expect that func (o *Object) Remove() gets triggered, but that’s not the case.
Instead, if I rename a file before deleting it, the event “Remove()” gets triggered suddenly.

Is there anything I have to consider?

How are you testing this? Through a mount? Depending on the --vfs-cache-mode I think the VFS layer may wait until the file is closed before deleting it.