GNOME Bugzilla – Bug 314204
Links to folders added to Recent documents when opened
Last modified: 2010-03-25 14:38:46 UTC
Please describe the problem: If you have a link to, for example, your "download" folder on your desktop and open it, it is added to the Recent Documents submenu. Steps to reproduce: 1. Find some folder in your home directory. 2. Create a link to it somewhere. 3. Open this link in Nautilus. Actual results: It is added to the Recent Documents menu. Expected results: Just open the folder. Does this happen every time? I just tested it again a couple of times, and no, it doesn't ... Very strange. Other information:
The main gnome menus come from the GNOME panel.
this is nautilus' fault; it checks if the URI points to a directory, but if it's a symlink, nautilus thinks it's a regular file, and adds the URI to the RecentModel.
Created attachment 51269 [details] [review] fix for nautilus this should fix nautilus file check for directories, and fix the symlink bug.
reassigning to nautilus
uhm, gnome-vfs should do this lookup for itself - but it is done asynchrounosly, so here's explained the "randomness": until gnome-vfs ends the lookup check on the symlink chain, you won't know if a symlink points to a directory or not.
That doesn't look right. First of all it doesn't handle symlink loops, so that it could loop. But its really is at the wrong level. The is-directory check should be done by stat(), not lstat() + manual following of symlinks. This should already be happening though, because nautilus always get file information using GNOME_VFS_FILE_INFO_FOLLOW_LINKS. Maybe we're not correctly using nautilus_file_call_when_ready() with the right attributes somewhere before calling get_activation_action() so that the file info is not filled in. That would explain this bug. It sure doesn't look so to me though: /* get the parameters for the actual file */ attributes = nautilus_mime_actions_get_minimum_file_attributes () | NAUTILUS_FILE_ATTRIBUTE_FILE_TYPE | NAUTILUS_FILE_ATTRIBUTE_SLOW_MIME_TYPE | NAUTILUS_FILE_ATTRIBUTE_ACTIVATION_URI; parameters->file = actual_file; parameters->callback = activate_callback; nautilus_file_call_when_ready (actual_file, attributes, activate_callback, parameters);
If you can reproduce this, can you debug it a bit to see what happens? Is the type of the file (GnomeVFSFileType) GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK? That would normally mean broken link. Or is it GNOME_VFS_FILE_TYPE_UNKNOWN maybe?
NEEDINFO - This is about gnome-vfs, does this still happen with gvfs which is used in GNOME 2.26/2.28?
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!