[vlc-commits] macosx: work-around for Mountain Lion which treats folder with the name ' BDMV' and the sub item 'INDEX.BDM' as a file with the UTI 'public.directory '
Felix Paul Kühne
git at videolan.org
Tue Feb 5 01:00:58 CET 2013
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Feb 5 01:00:46 2013 +0100| [79c8560a5e36d6f872a740aeeb6a62c8069c3eae] | committer: Felix Paul Kühne
macosx: work-around for Mountain Lion which treats folder with the name 'BDMV' and the sub item 'INDEX.BDM' as a file with the UTI 'public.directory'
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79c8560a5e36d6f872a740aeeb6a62c8069c3eae
---
modules/gui/macosx/open.m | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index 77a18ff..ccb8d9d 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -1097,11 +1097,15 @@ static VLCOpen *_o_sharedMainInstance = nil;
NSOpenPanel *o_open_panel = [NSOpenPanel openPanel];
[o_open_panel setAllowsMultipleSelection: NO];
- [o_open_panel setCanChooseFiles: NO];
[o_open_panel setCanChooseDirectories: YES];
[o_open_panel setTitle: [sender title]];
[o_open_panel setPrompt: _NS("Open")];
+ /* work-around for Mountain Lion, which treats folders called "BDMV" including an item named "INDEX.BDM"
+ * as a _FILE_. Don't ask, move on. There is nothing to see here */
+ [o_open_panel setCanChooseFiles: YES];
+ [o_open_panel setAllowedFileTypes:[NSArray arrayWithObjects:@"public.directory", nil]];
+
if ([o_open_panel runModal] == NSOKButton) {
NSString *o_path = [[[o_open_panel URLs] objectAtIndex: 0] path];
if ([o_path length] > 0) {
More information about the vlc-commits
mailing list