Merge "Fix for bug 2467152 files with spaces fail to open."

This commit is contained in:
Jean-Baptiste Queru
2010-05-04 15:16:32 -07:00
committed by Android Code Review

View File

@@ -67,7 +67,7 @@ public class MimeTypeMap {
// if the filename contains special characters, we don't
// consider it valid for our matching purposes:
if (filename.length() > 0 &&
Pattern.matches("[a-zA-Z_0-9\\.\\-\\(\\)]+", filename)) {
Pattern.matches("[a-zA-Z_0-9\\.\\-\\(\\)\\%]+", filename)) {
int dotPos = filename.lastIndexOf('.');
if (0 <= dotPos) {
return filename.substring(dotPos + 1);