Skip to content

Commit

Permalink
fix: all files selection logic on linux (#34516)
Browse files Browse the repository at this point in the history
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
  • Loading branch information
trop[bot] and codebytere committed Jun 14, 2022
1 parent 48f4ef6 commit 3707829
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shell/browser/ui/file_dialog_gtk.cc
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3707829

Please sign in to comment.