| Index: chrome/browser/download/download_extension_api.cc
|
| diff --git a/chrome/browser/download/download_extension_api.cc b/chrome/browser/download/download_extension_api.cc
|
| index 48006b83ce1ae96bdbcd98f17722a4bffec249a1..cdf0193ff2ef33882e4c8323ea762f597ede8def 100644
|
| --- a/chrome/browser/download/download_extension_api.cc
|
| +++ b/chrome/browser/download/download_extension_api.cc
|
| @@ -172,12 +172,11 @@ DownloadItem::DownloadState StateEnumFromString(const std::string& state) {
|
|
|
| bool ValidateFilename(const string16& filename) {
|
| // TODO(benjhayden): More robust validation of filename.
|
| - if (filename.size() >= 2u && filename[0] == L'.' && filename[1] == L'.')
|
| + if ((filename.find('/') != string16::npos) ||
|
| + (filename.find('\\') != string16::npos))
|
| return false;
|
| -
|
| - if (filename.size() >= 1u && filename[0] == L'/')
|
| + if (filename.size() >= 2u && filename[0] == L'.' && filename[1] == L'.')
|
| return false;
|
| -
|
| return true;
|
| }
|
|
|
|
|