Browse Source

A more careful assertion about allowed file type filters in MacOS FileChoosers

tags/2021-05-28
Tom Poole 7 years ago
parent
commit
3519de9a22
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      modules/juce_gui_basics/native/juce_mac_FileChooser.mm

+ 2
- 1
modules/juce_gui_basics/native/juce_mac_FileChooser.mm View File

@@ -40,7 +40,8 @@ static NSMutableArray* createAllowedTypesArray (const StringArray& filters)
#if defined (MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6)
// From OS X 10.6 you can only specify allowed extensions, so any filters containing wildcards
// must be of the form "*.extension"
jassert (filters[i].indexOf ("*") <= 0);
jassert (filters[i] == "*"
|| (filters[i].startsWith ("*.") && filters[i].lastIndexOfChar ('*') == 0));
#endif
const String f (filters[i].replace ("*.", ""));


Loading…
Cancel
Save