GNOME Bugzilla – Bug 313624
Double entries in menu caused by on disk monitoring
Last modified: 2005-08-18 12:58:51 UTC
Distribution/Version: Mandriva cooker monitoring code in gnome-menus is having some difficulties when topdir applications directory is deleted and re-created, resulting in double entries in menu. Testcase attached : 1/stop gnome-panel (gnome-session-remove gnome-panel) 1/untar testcase in $HOME : it will create .local and .config directories containing relevant files 2/start gnome-panel manually 3/open menu in gnome-panel (to ensure it is loaded) => you should see one gnomemeeting entry 4/in shell, rm -fr ~/.local ~/.config 5/untar testcase again 6/open menu in gnome-panel => you should see two gnomemeeting entries. Patch attached to fix this issue (I'm not sure it is 100% clean, because we need to monitor parent of topdir applications menu but only for applications directory deletion or creation, nothing else.
Created attachment 50782 [details] testcase
Created attachment 50783 [details] [review] patch fixing the issue
Thanks, fix was pretty straightforward, but I've also fixed up another issue with that code. Not sure if the fixes interact, they probably don't, but best to test all of it together: 2005-08-18 Mark McLoughlin <mark@skynet.ie> Fixes "duplicate entry" issue in bug #313624 * libmenu/entry-directories.c: (handle_cached_dir_changed): Look up the CachedDir for the parent of whatever path we're being notified about - we could be getting notified about ourself being created/deleted. Please do give this a hammering, we're very close to release now.
hmm, I'm having some problems with CVS snapshot for 10mins ago (it contains all your fixes) when doing rm -f ~/.config ~/.local which contains a full tree => gnome-panel goes into infinite loop :(
Created attachment 50897 [details] [review] fix infinite loop this patch fixes the infinite loop introduced by previous commits. It is usually best to increment iterator :) With this patch, my testcase are ok, no regression seen nor infinite loop.
reopening, I'm seeing the problem (which was not fixed with my initial patch) with a slightly different testcase).
Thanks, committed the patch for the infinite loop: 2005-08-18 Mark McLoughlin <mark@skynet.ie> Patch from Federic Crozat <fcrozat@mandriva.com> * libmenu/entry-directories.c: (cached_dir_remove_reference): Fix infinite loop. If you're seeing any slightly different issues, please open a new bug - things get confusing otherwise.