evolution r34971 - trunk/widgets/misc
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r34971 - trunk/widgets/misc
- Date: Thu, 7 Feb 2008 17:50:54 +0000 (GMT)
Author: mcrha
Date: Thu Feb 7 17:50:53 2008
New Revision: 34971
URL: http://svn.gnome.org/viewvc/evolution?rev=34971&view=rev
Log:
2008-02-07 Milan Crha <mcrha redhat com>
** Fix for bug #249501
* e-attachment.c: (attachment_guess_mime_type):
gnome_vfs_get_file_info expects URI,
thus if file_name contains '%' it failed.
Modified:
trunk/widgets/misc/ChangeLog
trunk/widgets/misc/e-attachment.c
Modified: trunk/widgets/misc/e-attachment.c
==============================================================================
--- trunk/widgets/misc/e-attachment.c (original)
+++ trunk/widgets/misc/e-attachment.c Thu Feb 7 17:50:53 2008
@@ -235,6 +235,21 @@
GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE |
GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
+
+ if (result != GNOME_VFS_OK) {
+ CamelURL *url;
+ char *uri;
+
+ url = camel_url_new ("file://", NULL);
+ camel_url_set_path (url, file_name);
+ uri = camel_url_to_string (url, 0);
+ camel_url_free (url);
+
+ result = gnome_vfs_get_file_info (uri, info, GNOME_VFS_FILE_INFO_GET_MIME_TYPE | GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE | GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
+
+ g_free (uri);
+ }
+
if (result == GNOME_VFS_OK) {
gchar *content = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]