Merge pull request #6315 from electron/fix-extension-match
Don't use MatchesExtension for matching filters
This commit is contained in:
commit
df3e651fbf
1 changed files with 3 additions and 1 deletions
|
@ -211,7 +211,9 @@ base::FilePath FileChooserDialog::AddExtensionForFilename(
|
|||
|
||||
const auto& extensions = filters_[i].second;
|
||||
for (const auto& extension : extensions) {
|
||||
if (extension == "*" || path.MatchesExtension("." + extension))
|
||||
if (extension == "*" ||
|
||||
base::EndsWith(path.value(), "." + extension,
|
||||
base::CompareCase::INSENSITIVE_ASCII))
|
||||
return path;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue