Re: [Nautilus-list] eel-1.0.1 SEGFAULT on missing mime-type from gnome-vfs

On Tuesday, July 10, 2001, at 06:05  PM, Hakon Alstadheim wrote:

Nautilus with eel-1.0.1 and gnome-vfs-1.0 segfaults in strcasecmp at
startup OMM. Probably some gremlins in my font-directories. The patch
below will quietly ignore such gremlins.

--- eel-1.0.1.old/eel/eel-font-manager.c	Tue Jul  3 12:51:17 2001
+++ eel-1.0.1/eel/eel-font-manager.c	Sun Jul  8 22:59:50 2001
@@ -694,7 +694,7 @@
 	while (TRUE) {
 		info = gnome_vfs_file_info_new ();
 		result = gnome_vfs_directory_read_next (directory, info);
-		if (result == GNOME_VFS_OK) {
+		if (result == GNOME_VFS_OK && info->mime_type) {
 			if (strcasecmp (info->mime_type, POSTSCRIPT_FONT_MIME_TYPE) == 0) {
 				*postscript_font_list = g_list_prepend (*postscript_font_list,
 					g_strconcat (font_directory,

This fix will work, but it's also a gnome-vfs bug. The gnome-vfs calls are never supposed to return NULL for mime_type if the MIME type is asked for. If the MIME type is unknown, it's supposed to return "application/x-octet-string" (or something similar, I can't recall exactly what).

I'll look at this tomorrow.

    -- Darin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]