Commit 55aabaaa authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Treat directory items like file ones for URI->name generation

parent b4edd4e5
...@@ -363,7 +363,10 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri ) ...@@ -363,7 +363,10 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
p_i->i_type = GuessType( p_i ); p_i->i_type = GuessType( p_i );
if( !p_i->psz_name && p_i->i_type == ITEM_TYPE_FILE ) if( p_i->psz_name )
;
else
if( p_i->i_type == ITEM_TYPE_FILE || p_i->i_type == ITEM_TYPE_DIRECTORY )
{ {
const char *psz_filename = strrchr( p_i->psz_uri, '/' ); const char *psz_filename = strrchr( p_i->psz_uri, '/' );
...@@ -376,12 +379,11 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri ) ...@@ -376,12 +379,11 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
if( p_i->psz_name ) if( p_i->psz_name )
decode_URI( p_i->psz_name ); decode_URI( p_i->psz_name );
} }
else
/* The name is NULL: fill it with everything except login and password */ { /* Strip login and password from title */
if( !p_i->psz_name )
{
int r; int r;
vlc_url_t url; vlc_url_t url;
vlc_UrlParse( &url, psz_uri, 0 ); vlc_UrlParse( &url, psz_uri, 0 );
if( url.psz_protocol ) if( url.psz_protocol )
{ {
......
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