[Qt] When opening a VIDEO_TS folder, use dvd:// and not directory://
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 17 Oct 2008 17:49:17 +0000 (19:49 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 17 Oct 2008 17:50:53 +0000 (19:50 +0200)
This should close #2167. But must be checked for extra "/" on windows.

modules/gui/qt4/dialogs_provider.cpp

index 5a6fef4..27dcf6e 100644 (file)
@@ -420,8 +420,11 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
 
     if (!dir.isEmpty() )
     {
-        input_item_t *p_input = input_item_NewExt( THEPL,
-                              qtu( "directory://" + toNativeSeparators(dir) ),
+        msg_Dbg( p_intf, "Directory opening: %s", qtu( dir ) );
+        input_item_t *p_input = input_item_NewExt( THEPL, qtu(
+                dir.endsWith( "VIDEO_TS", Qt::CaseInsensitive ) ? "dvd://"
+                                                                :"directory://"
+                                          + toNativeSeparators(dir) ),
                               NULL, 0, NULL, -1 );
 
         /* FIXME: playlist_AddInput() can fail */