vlc/vlc-2.0 | branch: master | Felix Paul Kühne <[email protected]> | Tue 
Feb  5 01:00:46 2013 +0100| [385689d1a2c326c74f0c043ee91c0f3aa23c7e76] | 
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'
(cherry picked from commit 79c8560a5e36d6f872a740aeeb6a62c8069c3eae)

Conflicts:
        modules/gui/macosx/open.m

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=385689d1a2c326c74f0c043ee91c0f3aa23c7e76
---

 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 bed2495..88b9614 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -929,11 +929,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];

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to