GNOME Bugzilla – Bug 171212
Doesn't emit EVENT_DELETED on readonly directory
Last modified: 2018-07-01 08:47:01 UTC
When nautilus tries to monitor readonly directories, say /root from normal user, gamin emit's deleted event on that directory. I think it's not true, and there should be some error handling like test for EACCESS or not in results of g_dir_open call in gam_poll_scan_directory_internal.
Sounds like a bug, yes. Would be good to see how the original FAM implementation did about this case, well the latests version with the security patch in to avoid listing directories which should not be readable. Sounds trivial to make python based tests like python/tests/basic.py to check various cases about directories and permissions. Daniel
Fam 2.7 also behaves so. Thus I think it's better to create workaround this in nautilus.
Sorry, I was wrong. Fam 2.7 really has expected behaviour and gamin is wrong in this situation. This is really a bug.
Created attachment 39218 [details] [review] tar.gz with patch and tests This patch should fix the problem
*** Bug 149492 has been marked as a duplicate of this bug. ***
*** Bug 165938 has been marked as a duplicate of this bug. ***
*** Bug 171972 has been marked as a duplicate of this bug. ***
*** Bug 172455 has been marked as a duplicate of this bug. ***
Oops , I nearly forgot about that issue. I applied the patch, added the new regression tests and commited. Unfortunately this doesn't look complete really, as this break one of the python dnotify regression tests: dnotify4.py -- dnotify4.py Error got event 2 expected 8 so more checking and fixes may be needed Daniel
W.r.t. dnotify4.py regression failure, the code fails now when monitoring a file as a directory. It report is as EXIST while it should not, the resource is not available as a directory, I think this is wrong and need to be fixed i.e. Deleted should be reported, not Exist in that case. Daniel
*** Bug 300161 has been marked as a duplicate of this bug. ***
*** Bug 303233 has been marked as a duplicate of this bug. ***
gamin is not under active development anymore and has not seen code changes for many years. Its codebase has been archived: https://gitlab.gnome.org/Archive/gamin/commits/master Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.