Commit bc02f60c authored by Pierre Lamot's avatar Pierre Lamot Committed by Jean-Baptiste Kempf

qt: fix subtitle open not selecting the current video folder

scheme was prunned
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8d9e7fda
......@@ -794,22 +794,20 @@ void DialogsProvider::loadSubtitlesFile()
if( !p_item ) return;
char *path = input_item_GetURI( p_item );
char *path2 = NULL;
QUrl url;
if( path )
{
path2 = vlc_uri2path( path );
free( path );
if( path2 )
{
char *sep = strrchr( path2, DIR_SEP_CHAR );
if( sep ) *sep = '\0';
}
url.setUrl( qfu(path) );
url = url.adjusted(QUrl::RemoveFilename);
if (url.scheme() != "file")
url.clear();
free(path);
}
QStringList qsl = showSimpleOpen( qtr( "Open subtitles..." ),
EXT_FILTER_SUBTITLE,
qfu( path2 ) );
free( path2 );
url );
foreach( const QString &qsUrl, qsl )
{
if( input_AddSlave( p_input, SLAVE_TYPE_SPU, qtu( qsUrl ), true, true, false ) )
......
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