mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Reworked the logic in FileBrowserComponent::currentFileIsValid() to ensure that directories can't be selected when only browsing for files
This commit is contained in:
parent
8eb626a338
commit
3c312b9d76
1 changed files with 3 additions and 3 deletions
|
|
@ -180,10 +180,10 @@ bool FileBrowserComponent::currentFileIsValid() const
|
|||
{
|
||||
auto f = getSelectedFile (0);
|
||||
|
||||
if (isSaveMode())
|
||||
return (flags & canSelectDirectories) != 0 || ! f.isDirectory();
|
||||
if ((flags & canSelectDirectories) == 0 && f.isDirectory())
|
||||
return false;
|
||||
|
||||
return f.exists();
|
||||
return isSaveMode() || f.exists();
|
||||
}
|
||||
|
||||
File FileBrowserComponent::getHighlightedFile() const noexcept
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue