Commit 385689d1 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: work-around for Mountain Lion which treats folder with the name 'BDMV'...

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'
(cherry picked from commit 79c8560a5e36d6f872a740aeeb6a62c8069c3eae)

Conflicts:
	modules/gui/macosx/open.m
parent 2c27b625
...@@ -929,11 +929,15 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -929,11 +929,15 @@ static VLCOpen *_o_sharedMainInstance = nil;
NSOpenPanel *o_open_panel = [NSOpenPanel openPanel]; NSOpenPanel *o_open_panel = [NSOpenPanel openPanel];
[o_open_panel setAllowsMultipleSelection: NO]; [o_open_panel setAllowsMultipleSelection: NO];
[o_open_panel setCanChooseFiles: NO];
[o_open_panel setCanChooseDirectories: YES]; [o_open_panel setCanChooseDirectories: YES];
[o_open_panel setTitle: [sender title]]; [o_open_panel setTitle: [sender title]];
[o_open_panel setPrompt: _NS("Open")]; [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) if ([o_open_panel runModal] == NSOKButton)
{ {
NSString *o_path = [[[o_open_panel URLs] objectAtIndex: 0] path]; NSString *o_path = [[[o_open_panel URLs] objectAtIndex: 0] path];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment