Skip to content

Commit

Permalink
Merge pull request #12963 from trop-bot/2-0-x-bp-fix-empty-descriptio…
Browse files Browse the repository at this point in the history
…n-when-only-one-extension-is-given-(getfiletypesfromaccepttype)-1526480331702

Backport (2-0-x) - Fix empty description when only one extension is given (GetFileTypesFromAcceptType)
  • Loading branch information
John Kleinschmidt committed May 16, 2018
2 parents 9796513 + d3e5f43 commit 773f08c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atom/browser/web_dialog_helper.cc
Expand Up @@ -168,10 +168,10 @@ file_dialog::Filters GetFileTypesFromAcceptType(

filters.push_back(file_dialog::Filter());

if (valid_type_count > 1 ||
(valid_type_count == 1 && description.empty() && extensions.size() > 1))
if (valid_type_count > 1 || (valid_type_count == 1 && description.empty()))
description = "Custom Files";

DCHECK(!description.empty());
filters[0].first = description;

for (const auto& extension : extensions) {
Expand Down

0 comments on commit 773f08c

Please sign in to comment.