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.
This commit is contained in:
Darin Adler 2001-01-20 02:25:55 +00:00
parent 5ce3150238
commit a41279bb5b
4 changed files with 24 additions and 9 deletions

View file

@ -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:

View file

@ -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"

View file

@ -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;
}

View file

@ -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;
}