GNOME Bugzilla – Bug 353917
Recursive check for do_is_local
Last modified: 2018-08-17 13:50:03 UTC
When a nonexistent file is monitored, it is always done with the FAM interface. This is because the is_local check always returns FALSE when the file doesn't exist, triggering the FAM interface instead of the inotify one. This can trigger one of the numerous gamin bugs (see http://bugs.debian.org/385344 for an example) or lock up if FAM isn't running. Instead of that, do_is_local should recursively check directories so that the returned value tells whether the file *would* be local if it existed.
Created attachment 72050 [details] [review] Proposed implementation for 2.14.2
HEAD instead just assumes non-existing files are local.
Well, this won't work in some cases either. Let's say /home is mounted over NFS, and something starts monitoring e.g. /home/toto/.local/applications (that doesn't exist) for new .desktop files. As the directory doesn't exist, it will be monitored with inotify instead of FAM and you'll never get notified when the directory is created. Please reconsider this change. I can try to improve the patch (especially for a better cache use) if you agree with the general idea.
Created attachment 72341 [details] [review] Patch for 2.16.0
gnome-vfs got deprecated in 2008. gnome-vfs is not under active development anymore and had its last code changes in 2011. Its codebase has been archived: https://gitlab.gnome.org/Archive/gnome-vfs/commits/master gio (in glib) and gvfs are its successors. See https://developer.gnome.org/gio/stable/ch33.html and https://people.gnome.org/~gicmo/gio-migration-guide/ for porting info. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent + supported version of glib/gio/gvfs. Thanks!