| Index: WebCore/html/File.cpp
|
| diff --git a/WebCore/html/File.cpp b/WebCore/html/File.cpp
|
| index 97fdc4578d74b225e5946f4d6aef256525443ae4..2c9ce53b83cb0df79a859522dc916f255bd84cc3 100644
|
| --- a/WebCore/html/File.cpp
|
| +++ b/WebCore/html/File.cpp
|
| @@ -33,12 +33,17 @@ namespace WebCore {
|
|
|
| File::File(const String& path)
|
| : Blob(path)
|
| - , m_name(pathGetFileName(path))
|
| {
|
| // We don't use MIMETypeRegistry::getMIMETypeForPath() because it returns "application/octet-stream" upon failure.
|
| - int index = m_name.reverseFind('.');
|
| + const String& fileName = name();
|
| + int index = fileName.reverseFind('.');
|
| if (index != -1)
|
| - m_type = MIMETypeRegistry::getMIMETypeForExtension(m_name.substring(index + 1));
|
| + m_type = MIMETypeRegistry::getMIMETypeForExtension(fileName.substring(index + 1));
|
| +}
|
| +
|
| +const String& File::name() const
|
| +{
|
| + return items().at(0)->toFileBlobItem()->name();
|
| }
|
|
|
| } // namespace WebCore
|
|
|