mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 22:49:31 +08:00
[mac] Attempt to fix 10.14 compilation issue
This commit is contained in:
parent
81b3ecb056
commit
e12b630dfb
@ -497,16 +497,16 @@
|
||||
filters = [filters stringByReplacingOccurrencesOfString:@"*." withString:@""];
|
||||
filters = [filters stringByReplacingOccurrencesOfString:@" " withString:@""];
|
||||
NSArray *filterList = [filters componentsSeparatedByString:@";"];
|
||||
if (@available(macOS 10.16, *)) {
|
||||
#ifdef USE_NEW_FILTERS
|
||||
NSMutableArray *contentTypes = [[NSMutableArray new] autorelease];
|
||||
for (NSString *filter in filterList) {
|
||||
UTType *t = [UTType typeWithFilenameExtension:filter];
|
||||
[contentTypes addObject:t];
|
||||
}
|
||||
[dialog setAllowedContentTypes:contentTypes];
|
||||
} else {
|
||||
#else
|
||||
[dialog setAllowedFileTypes:filterList];
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
[dialog setAllowsOtherFileTypes:true];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user