Commit 8d5e7cc8 authored by Erwan Tulou's avatar Erwan Tulou

core: use make_path in subtile_Detect

this also solves uri alteration on Windows (recent regression)
parent 37de4458
...@@ -262,22 +262,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path, ...@@ -262,22 +262,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
if( !psz_name_org ) if( !psz_name_org )
return NULL; return NULL;
if( !strncmp( psz_name_org, "file://", 7 ) ) char *psz_fname = make_path( psz_name_org );
{
psz_name_org += 7;
#if defined( WIN32 )
psz_name_org ++ ;
#endif
if( !strncmp( psz_name_org, "localhost", 9 ) )
psz_name_org += 9;
}
#if (DIR_SEP_CHAR != '/')
/* Turn slashes into anti-slashes */
for( char *s = strchr( psz_name_org, '/' ); s; s = strchr( s + 1, '/' ) )
*s = DIR_SEP_CHAR;
#endif
char *psz_fname = decode_URI_duplicate( psz_name_org );
if( !psz_fname ) if( !psz_fname )
return NULL; return NULL;
......
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