1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

[macOS] Handle bundles as files in the embedded file dialogs.

This commit is contained in:
bruvzg
2024-11-04 11:50:42 +02:00
committed by Pāvels Nadtočajevs
parent 0f20e67d8d
commit d5e599f77e
9 changed files with 213 additions and 47 deletions

View File

@@ -96,4 +96,14 @@ bool DirAccessMacOS::is_case_sensitive(const String &p_path) const {
return [cs boolValue];
}
bool DirAccessMacOS::is_bundle(const String &p_file) const {
String f = p_file;
if (!f.is_absolute_path()) {
f = get_current_dir().path_join(f);
}
f = fix_path(f);
return [[NSWorkspace sharedWorkspace] isFilePackageAtPath:[NSString stringWithUTF8String:f.utf8().get_data()]];
}
#endif // UNIX_ENABLED