GNOME Bugzilla – Bug 135629
gnome-desktop-item.c misuses of gnome_vfs_uri_is_local()
Last modified: 2004-12-22 21:47:04 UTC
There are a number of misuses of gnome_vfs_uri_is_local() in the libgnome-desktop/gnome-desktop-item.c file. These cause, for example, gnome-panel launchers that use "%f" to fail to send the %f argument to the launched application when the file is on an NFS mounted volume. Normally, %f should send the file name (ie NOT a URL) to the launched application. %F _does_ indeed work, but %f fails when the directory that the argument comes from (like ~/Desktop for homedirs) is network-mounted. The get_first_*() functions are guilty of this bug. static char * get_first_file (GSList **arg_ptr) { while (*arg_ptr != NULL) { GnomeVFSURI *uri = (*arg_ptr)->data; if (gnome_vfs_uri_is_local (uri)) { char *path; path = g_strdup (gnome_vfs_uri_get_path (uri)); return path; } *arg_ptr = (*arg_ptr)->next; } return NULL; } Here, since this function is called from the %f substitution block lower down, the gnome_vfs_uri_is_local() skips over any object that is on a network mount, as all objects in my homedir are.
Created attachment 24931 [details] [review] patch
Dan, I've committed that patch to HEAD. If you have time, I'd appreciate it if you could test it out with NFS dirs.