diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rwxr-xr-x | autogen.sh | 2 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-file.c | 9 | ||||
-rw-r--r-- | libnautilus-private/nautilus-file.c | 9 |
4 files changed, 24 insertions, 9 deletions
@@ -1,3 +1,16 @@ +2001-01-19 Darin Adler <darin@eazel.com> + + reviewed by: John Sullivan <sullivan@eazel.com> + + Fix for bug 5475 (assertion and crash trying to return using Up + from web link): + + * libnautilus-extensions/nautilus-file.c: (get_description): Instead + of asserting that the MIME type is not NULL or empty string, just + change the code to return an empty description for those cases. + + * autogen.sh: Fix one silly "ignore non-fatal errors" message. + 2001-01-19 Andy Hertzfeld <andy@eazel.com> * nautilus.spec.in: diff --git a/autogen.sh b/autogen.sh index 158086f08..10110490c 100755 --- a/autogen.sh +++ b/autogen.sh @@ -66,7 +66,7 @@ echo "Running gettextize... Ignore non-fatal messages." # while making dist. echo "no" | gettextize --copy --force -echo "Running xml-i18n-toolize... Ignore non-fatal messages." +echo "Running xml-i18n-toolize" xml-i18n-toolize --copy --force --automake echo "Running libtoolize" diff --git a/libnautilus-extensions/nautilus-file.c b/libnautilus-extensions/nautilus-file.c index c32a2d55d..474b1ffe7 100644 --- a/libnautilus-extensions/nautilus-file.c +++ b/libnautilus-extensions/nautilus-file.c @@ -3669,16 +3669,17 @@ get_description (NautilusFile *file) } mime_type = file->details->info->mime_type; - - g_assert (mime_type != NULL && mime_type[0] != '\0'); + if (nautilus_str_is_empty (mime_type)) { + return NULL; + } if (g_strcasecmp (mime_type, GNOME_VFS_MIME_TYPE_UNKNOWN) == 0 - && nautilus_file_is_executable (file)) { + && nautilus_file_is_executable (file)) { return _("program"); } description = gnome_vfs_mime_get_description (mime_type); - if (nautilus_strlen (description) > 0) { + if (!nautilus_str_is_empty (description)) { return description; } diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c index c32a2d55d..474b1ffe7 100644 --- a/libnautilus-private/nautilus-file.c +++ b/libnautilus-private/nautilus-file.c @@ -3669,16 +3669,17 @@ get_description (NautilusFile *file) } mime_type = file->details->info->mime_type; - - g_assert (mime_type != NULL && mime_type[0] != '\0'); + if (nautilus_str_is_empty (mime_type)) { + return NULL; + } if (g_strcasecmp (mime_type, GNOME_VFS_MIME_TYPE_UNKNOWN) == 0 - && nautilus_file_is_executable (file)) { + && nautilus_file_is_executable (file)) { return _("program"); } description = gnome_vfs_mime_get_description (mime_type); - if (nautilus_strlen (description) > 0) { + if (!nautilus_str_is_empty (description)) { return description; } |