Skip to content

Commit 431ea61

Browse files
committed
Don't use MatchesExtension for matching filters
MatchesExtension compares double extensions like .tar.gz, which does not match the filters.
1 parent 36a0a49 commit 431ea61

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎atom/browser/ui/file_dialog_gtk.cc‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ base::FilePath FileChooserDialog::AddExtensionForFilename(
211211

212212
const auto& extensions = filters_[i].second;
213213
for (const auto& extension : extensions) {
214-
if (extension == "*" || path.MatchesExtension("." + extension))
214+
if (extension == "*" ||
215+
base::EndsWith(path.value(), "." + extension,
216+
base::CompareCase::INSENSITIVE_ASCII))
215217
return path;
216218
}
217219

0 commit comments

Comments
 (0)