Commit a4c0b9de authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

core: Temporarily fix input_item_SetURI() for 1.0 bugfix.

It now will handle both paths and URIs when trying to determine the filename.
This balances [873234a1].
parent ffd4ec22
......@@ -361,8 +361,14 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
if( !p_i->psz_name && p_i->i_type == ITEM_TYPE_FILE )
{
const char *psz_filename = strrchr( p_i->psz_uri, DIR_SEP_CHAR );
if( psz_filename && *psz_filename == DIR_SEP_CHAR )
const char *psz_filename;
if( !strstr( p_i->psz_uri, "://" ) )
psz_filename = strrchr( p_i->psz_uri, '/' );
else
psz_filename = strrchr( p_i->psz_uri, DIR_SEP_CHAR );
if( psz_filename && ( *psz_filename == DIR_SEP_CHAR || *psz_filename == '/' ) )
psz_filename++;
if( psz_filename && *psz_filename )
p_i->psz_name = strdup( psz_filename );
......
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