diff options
author | Lluis Sanchez <lluis@novell.com> | 2010-03-23 13:34:19 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2010-03-23 13:34:19 +0300 |
commit | 25f58bc96e7e4817bb59bb851e33406f5a358b21 (patch) | |
tree | b2816ab87a14b21fc7e70546525720cca30340e3 /main/src/addins/GnomePlatform | |
parent | 12c7fc9cd3aa4c8889627aff79448da5d796c811 (diff) |
* GnomePlatform.cs: If getting the mime type using gio fails for
some reason, fallback to vfs.
svn path=/trunk/monodevelop/; revision=154047
Diffstat (limited to 'main/src/addins/GnomePlatform')
-rw-r--r-- | main/src/addins/GnomePlatform/ChangeLog | 5 | ||||
-rw-r--r-- | main/src/addins/GnomePlatform/GnomePlatform.cs | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/main/src/addins/GnomePlatform/ChangeLog b/main/src/addins/GnomePlatform/ChangeLog index dfa7095a85..2b2737b18e 100644 --- a/main/src/addins/GnomePlatform/ChangeLog +++ b/main/src/addins/GnomePlatform/ChangeLog @@ -1,3 +1,8 @@ +2010-03-23 Lluis Sanchez Gual <lluis@novell.com> + + * GnomePlatform.cs: If getting the mime type using gio fails + for some reason, fallback to vfs. + 2010-03-22 Lluis Sanchez Gual <lluis@novell.com> * AssemblyInfo.cs: diff --git a/main/src/addins/GnomePlatform/GnomePlatform.cs b/main/src/addins/GnomePlatform/GnomePlatform.cs index 32697281c5..b339980dc5 100644 --- a/main/src/addins/GnomePlatform/GnomePlatform.cs +++ b/main/src/addins/GnomePlatform/GnomePlatform.cs @@ -92,10 +92,12 @@ namespace MonoDevelop.Platform if (uri == null) return null; - if (useGio) - return Gio.GetMimeTypeForUri (uri); - else - return Gnome.Vfs.MimeType.GetMimeTypeForUri (ConvertFileNameToVFS (uri)); + if (useGio) { + string mt = Gio.GetMimeTypeForUri (uri); + if (mt != null) + return mt; + } + return Gnome.Vfs.MimeType.GetMimeTypeForUri (ConvertFileNameToVFS (uri)); } protected override bool OnGetMimeTypeIsText (string mimeType) |