From b8cff6d73fdc20779db84171510d469e3887f772 Mon Sep 17 00:00:00 2001 From: camila314 <47485054+camila314@users.noreply.github.com> Date: Sun, 12 Jan 2025 14:15:09 -0600 Subject: [PATCH] Allow '*.ext' for allowed file types on mac --- loader/src/platform/mac/util.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/loader/src/platform/mac/util.mm b/loader/src/platform/mac/util.mm index 8ea3c97d1..f8176f3dd 100644 --- a/loader/src/platform/mac/util.mm +++ b/loader/src/platform/mac/util.mm @@ -133,7 +133,10 @@ @implementation FileDialog NSMutableArray* allowedFileTypes = [NSMutableArray new]; for (auto& filter : options.filters) { for (auto& ext : filter.files) { - [allowedFileTypes addObject: intoNS(ext)]; + if (ext.size() > 2 && strncmp(ext.c_str(), "*.", 2) == 0) + [allowedFileTypes addObject: intoNS(ext.substr(2))]; + else + [allowedFileTypes addObject: intoNS(ext)]; } } [openPanel setAllowedFileTypes: allowedFileTypes];