[Mono-bugs] [Bug 386008] Can't download files with unknown mime types in 2.0 profile
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri May 2 11:21:49 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=386008
User jbevain at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=386008#c2
Jb Evain <jbevain at novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jbevain at novell.com
--- Comment #2 from Jb Evain <jbevain at novell.com> 2008-05-02 09:21:48 MST ---
Slightly better patch (no unecessary cast, no double lookup).
Index: MimeTypes.cs
===================================================================
--- MimeTypes.cs (revision 102319)
+++ MimeTypes.cs (working copy)
-548,7 +548,7 @@
int dot = fileName.LastIndexOf ('.');
if (dot != -1 && fileName.Length > dot + 1)
- result = mimeTypes [fileName.Substring (dot +
1)] as string;
+ mimeTypes.TryGetValue (fileName.Substring (dot
+ 1), out result);
if (result == null)
result = "application/octet-stream";
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list