Don't use MatchesExtension for matching filters
MatchesExtension compares double extensions like .tar.gz, which does not match the filters.
This commit is contained in:
parent
36a0a491c9
commit
431ea61ff8
1 changed files with 3 additions and 1 deletions
|
@ -211,7 +211,9 @@ base::FilePath FileChooserDialog::AddExtensionForFilename(
|
||||||
|
|
||||||
const auto& extensions = filters_[i].second;
|
const auto& extensions = filters_[i].second;
|
||||||
for (const auto& extension : extensions) {
|
for (const auto& extension : extensions) {
|
||||||
if (extension == "*" || path.MatchesExtension("." + extension))
|
if (extension == "*" ||
|
||||||
|
base::EndsWith(path.value(), "." + extension,
|
||||||
|
base::CompareCase::INSENSITIVE_ASCII))
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue