]> git.sesse.net Git - vlc/commitdiff
macosx: trust the user that s/he knows what s/he's doing when opening a VIDEO_TS...
authorFelix Paul Kühne <fkuehne@videolan.org>
Wed, 9 May 2012 23:54:56 +0000 (01:54 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Wed, 9 May 2012 23:55:25 +0000 (01:55 +0200)
in other words, accept folders which aren't named 'VIDEO_TS'

modules/gui/macosx/open.m

index e76785b42ffaddf394bd7193512544946e18f22d..9a66b5983b90983ff463b7872f8a3784989e3d56 100644 (file)
@@ -829,9 +829,9 @@ static VLCOpen *_o_sharedMainInstance = nil;
             returnValue = kVLCMediaBD;
         else
         {
-            if ([mountPath rangeOfString:@"VIDEO_TS"].location != NSNotFound)
+            if ([mountPath rangeOfString:@"VIDEO_TS" options:NSCaseInsensitiveSearch | NSBackwardsSearch].location != NSNotFound)
                 returnValue = kVLCMediaVideoTSFolder;
-            else if ([mountPath rangeOfString:@"BDMV"].location != NSNotFound)
+            else if ([mountPath rangeOfString:@"BDMV" options:NSCaseInsensitiveSearch | NSBackwardsSearch].location != NSNotFound)
                 returnValue = kVLCMediaBDMVFolder;
             else
             {
@@ -853,7 +853,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
                     }
                 }
                 if(!returnValue)
-                    returnValue = kVLCMediaUnknown;
+                    returnValue = kVLCMediaVideoTSFolder;
             }
         }
 
@@ -972,13 +972,8 @@ static VLCOpen *_o_sharedMainInstance = nil;
         NSString *o_path = [[[o_open_panel URLs] objectAtIndex: 0] path];
         if ([o_path length] > 0 )
         {
-            if ([o_path rangeOfString:@"VIDEO_TS"].location != NSNotFound || [o_path rangeOfString:@"BDMV"].location != NSNotFound)
-            {
-                [o_specialMediaFolders addObject: o_path];
-                [self scanOpticalMedia: nil];
-            }
-            else
-                msg_Dbg( VLCIntf, "chosen directory is no suitable special media folder" );
+            [o_specialMediaFolders addObject: o_path];
+            [self scanOpticalMedia: nil];
         }
     }
 }