GNOME Bugzilla – Bug 546954
Nautilus symlink monitoring support
Last modified: 2021-06-18 15:55:45 UTC
This patch is supplement to the GIO inotify symlink support introduced in bug 536172. It allows Nautilus to monitor symlinks and update UI accordingly. Changes in symlink destination are reflected immediately, including type changes from file to directory and vice versa. For this to work, I had to add new monitor type and also add support to list view mode for directory <--> file mutation. Each symlink monitor (pointing to a file) will eat one inotify slot, however the real slots used will be much lower since we're always monitoring parent directory to detect file changes and GFileMonitor manages internal watch lists to avoid duplication. Live changes of number of items in subdirectories (in detailed list view) are still not supported anyway; we discussed this with upstream developers and concluded it's too expensive for inotify slots (whose number is quite limited).
Created attachment 116156 [details] [review] nautilus-inotify-symlink-support.patch Patch against trunk
Thanks for your efforts! Does this really need support at GIO level? Nautilus has a symbolic link hash table (nautilus-file.c:symbolic_links). Wouldn't it be more simple to map NautilusFile changes using this table?
The GIO inotify symlink support is quite complex and I don't want to duplicate efforts. Now that nautilus is dependent on new glib, I think we can rely on it. With older versions of glib2 (2.16 series) it should compile without error, it just won't be working.
Mass component change due to BZ cleanup, sorry for the noise.
Created attachment 287521 [details] [review] rebased patch I rebased the patch against current master, as I missed the bit of the first comment mentioning that resolving bug 536172 is a prerequisite.
*** Bug 701938 has been marked as a duplicate of this bug. ***
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Files (nautilus), then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/nautilus/-/issues/ Thank you for your understanding and your help.