From 37078297c6f9e90b155e17b86164c1e8792bbd0d Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 14 Jun 2022 12:36:02 -0400 Subject: [PATCH] fix: all files selection logic on linux (#34516) Co-authored-by: Shelley Vohr --- shell/browser/ui/file_dialog_gtk.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shell/browser/ui/file_dialog_gtk.cc b/shell/browser/ui/file_dialog_gtk.cc index 74df37b57d5f1..99f0e1524c36f 100644 --- a/shell/browser/ui/file_dialog_gtk.cc +++ b/shell/browser/ui/file_dialog_gtk.cc @@ -32,8 +32,11 @@ static const int kPreviewWidth = 256; static const int kPreviewHeight = 512; std::string MakeCaseInsensitivePattern(const std::string& extension) { - std::string pattern("*."); + // If the extension is the "all files" extension, no change needed. + if (extension == "*") + return extension; + std::string pattern("*."); for (std::size_t i = 0, n = extension.size(); i < n; i++) { char ch = extension[i]; if (!base::IsAsciiAlpha(ch)) {