fix: all files selection logic on linux (#34517)

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot]
2022-06-13 11:16:57 +02:00
committed by GitHub
parent ea2bea7382
commit 4dedbadcb5

View File

@@ -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)) {