diff --git a/Source/Engine/Platform/Mac/MacFileSystem.cpp b/Source/Engine/Platform/Mac/MacFileSystem.cpp index 859f583a0..4850886a0 100644 --- a/Source/Engine/Platform/Mac/MacFileSystem.cpp +++ b/Source/Engine/Platform/Mac/MacFileSystem.cpp @@ -133,7 +133,16 @@ bool MacFileSystem::ShowBrowseFolderDialog(Window* parentWindow, const StringVie bool MacFileSystem::ShowFileExplorer(const StringView& path) { - return [[NSWorkspace sharedWorkspace] selectFile: AppleUtils::ToNSString(FileSystem::ConvertRelativePathToAbsolute(path)) inFileViewerRootedAtPath: @""]; + String fullPath = FileSystem::ConvertRelativePathToAbsolute(path); + NSString* selectFile = AppleUtils::ToNSString(fullPath); + NSString* inFileViewerRootedAtPath = AppleUtils::ToNSString(String::Empty); + if (FileSystem::GetExtension(fullPath).IsEmpty()) + { + // Show folder contents + inFileViewerRootedAtPath = selectFile; + selectFile = nullptr; + } + return [[NSWorkspace sharedWorkspace] selectFile: selectFile inFileViewerRootedAtPath: inFileViewerRootedAtPath]; } #endif