Commit 8f529eae authored by Jean-Philippe Andre's avatar Jean-Philippe Andre

Do not read directory twice. This solves #1761 but this may not be the real...

Do not read directory twice. This solves #1761 but this may not be the real solution. See the origin of the segfault in my comments on the trac.
parent 622c1340
......@@ -422,11 +422,17 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
playlist_AddInput( THEPL, p_input,
go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND,
PLAYLIST_END, pl, pl_Unlocked );
if( !go )
input_Read( THEPL, p_input, false );
vlc_gc_decref( p_input );
}
}
void DialogsProvider::PLOpenDir()
{
openDirectory( p_intf, true, true );
}
void DialogsProvider::PLAppendDir()
{
openDirectory( p_intf, true, false );
......
......@@ -166,6 +166,7 @@ public slots:
void PLAppendDialog();
void MLAppendDialog();
void PLOpenDir();
void PLAppendDir();
void MLAppendDir();
......
......@@ -289,7 +289,7 @@ QMenu *QVLCMenu::FileMenu()
addDPStaticEntry( menu, qtr( "&Open File..." ), "",
":/file-asym", SLOT( openFileDialog() ), "Ctrl+O" );
addDPStaticEntry( menu, qtr( I_OPEN_FOLDER ), "",
":/folder-grey", SLOT( PLAppendDir() ), "Ctrl+F" );
":/folder-grey", SLOT( PLOpenDir() ), "Ctrl+F" );
addDPStaticEntry( menu, qtr( "Open &Disc..." ), "",
":/disc", SLOT( openDiscDialog() ), "Ctrl+D" );
addDPStaticEntry( menu, qtr( "Open &Network..." ), "",
......@@ -677,7 +677,7 @@ void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu )
addDPStaticEntry( openmenu, qtr( "&Open File..." ), "",
":/file-asym", SLOT( openFileDialog() ) );
addDPStaticEntry( openmenu, qtr( I_OPEN_FOLDER ), "",
":/folder-grey", SLOT( PLAppendDir() ) );
":/folder-grey", SLOT( PLOpenDir() ) );
addDPStaticEntry( openmenu, qtr( "Open &Disc..." ), "",
":/disc", SLOT( openDiscDialog() ) );
addDPStaticEntry( openmenu, qtr( "Open &Network..." ), "",
......
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