diff options
Diffstat (limited to 'devel/gnome-vfs')
-rw-r--r-- | devel/gnome-vfs/Makefile | 3 | ||||
-rw-r--r-- | devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-mime.c | 57 |
2 files changed, 59 insertions, 1 deletions
diff --git a/devel/gnome-vfs/Makefile b/devel/gnome-vfs/Makefile index 56132adc2..7507316e4 100644 --- a/devel/gnome-vfs/Makefile +++ b/devel/gnome-vfs/Makefile @@ -3,11 +3,12 @@ # Whom: Ade Lovett <ade@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/devel/gnomevfs2/Makefile,v 1.104 2005/08/24 13:03:58 kwm Exp $ +# $MCom: ports/devel/gnomevfs2/Makefile,v 1.105 2005/08/24 16:07:34 marcus Exp $ # PORTNAME= gnomevfs2 PORTVERSION= 2.11.92 +PORTREVISION= 1 CATEGORIES= devel gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gnome-vfs/2.11 diff --git a/devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-mime.c b/devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-mime.c new file mode 100644 index 000000000..693ade8b7 --- /dev/null +++ b/devel/gnome-vfs/files/patch-libgnomevfs_gnome-vfs-mime.c @@ -0,0 +1,57 @@ +--- libgnomevfs/gnome-vfs-mime.c.orig Sun Aug 28 02:00:22 2005 ++++ libgnomevfs/gnome-vfs-mime.c Sun Aug 28 02:07:11 2005 +@@ -211,7 +211,7 @@ _gnome_vfs_get_mime_type_internal (Gnome + + if (buffer != NULL) { + result = _gnome_vfs_read_mime_from_buffer (buffer); +- ++ + if (result != NULL && result != XDG_MIME_TYPE_UNKNOWN) { + + if ((strcmp (result, "application/x-ole-storage") == 0) || +@@ -229,9 +229,13 @@ _gnome_vfs_get_mime_type_internal (Gnome + result = fn_result; + } + +- } else if (fn_result && fn_result != XDG_MIME_TYPE_UNKNOWN && ++ } else { ++ G_LOCK (mime_mutex); ++ if (fn_result && fn_result != XDG_MIME_TYPE_UNKNOWN && + xdg_mime_mime_type_subclass (fn_result, result)) { +- result = fn_result; ++ result = fn_result; ++ } ++ G_UNLOCK (mime_mutex); + } + + return result; +@@ -243,18 +247,27 @@ _gnome_vfs_get_mime_type_internal (Gnome + * accurate source of type information BUT _only_ if + * the extension is a subtype of text/plain. + */ ++ G_LOCK (mime_mutex); + if ((fn_result != NULL) && (fn_result != XDG_MIME_TYPE_UNKNOWN) && + xdg_mime_mime_type_subclass (fn_result, "text/plain")) { ++ G_UNLOCK (mime_mutex); + return fn_result; + } + + /* Didn't find an extension match, assume plain text. */ ++ G_UNLOCK (mime_mutex); + return "text/plain"; + +- } else if (_gnome_vfs_sniff_buffer_looks_like_mp3 (buffer)) { +- return "audio/mpeg"; ++ } else { ++ G_LOCK (mime_mutex); ++ if (_gnome_vfs_sniff_buffer_looks_like_mp3 (buffer)) { ++ G_UNLOCK (mime_mutex); ++ return "audio/mpeg"; ++ } ++ G_UNLOCK (mime_mutex); + } + } ++ + } + + if (use_suffix && |