JBR-8198: substituting empty extension with the "Unix executable" type in the macOS file dialog (#479)

(cherry picked from commit cf45f88d9d0d93bdcd09afda07c4b77857bcc5a5)
This commit is contained in:
Roman Shevchenko
2025-01-29 15:17:41 +01:00
committed by Vitaly Provodin
parent d13f7cfd9f
commit a6d06afaf2

View File

@@ -145,6 +145,8 @@ canCreateDirectories:(BOOL)inCreateDirectories
UTType *contentType = [UTType typeWithFilenameExtension:fileType conformingToType:UTTypeData];
if (contentType != nil) {
[contentTypes addObject:contentType];
} else if (fileType.length == 0) {
[contentTypes addObject:UTTypeUnixExecutable];
}
}
[thePanel setAllowedContentTypes:contentTypes];