This is not an upstream issue but a problem in a patch from ubuntu 
(82_gnome-app-install.patch):
+void launch_gnome_app_install_mimetype(GdkScreen  *screen,
+                                      NautilusFile *file,
+                                      char *uri) {
+       char *qmimetype, *quri, *qduri, *command;
+       if (!screen)
+               screen = gdk_display_get_default_screen(gdk_display_get_default 
());
+
+       qmimetype = g_shell_quote (nautilus_file_info_get_mime_type (file));
+       quri = g_shell_quote (uri);
+       command = g_strconcat("gnome-app-install --mime-type=",
+                            qmimetype, " ", quri, 
+                            (char*)0 /* NB NULL is wrong */);
+       g_free (qmimetype);
+       g_free (quri);
+       g_free (qduri);
+
+       //eel_gnome_shell_execute_on_screen (command, screen);
+       gdk_spawn_command_line_on_screen (screen, command, NULL);
+       g_free (command);
+}


Probably best to check NULL for nautilus_file_info_get_mime_type () as it 
could, but very very rarely return NULL:
char *
nautilus_file_get_mime_type (NautilusFile *file)
{
        if (file != NULL) {
                g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
                if (file->details->mime_type != NULL) {
                        return g_strdup (eel_ref_str_peek 
(file->details->mime_type));
                }
        }
        return g_strdup ("application/octet-stream");
}

(Note, nautilus_file_info_get_mime_type() just calls the interface
function)

-- 
nautilus crashed with SIGSEGV in g_shell_quote()
https://bugs.launchpad.net/bugs/418979
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to