Commit 6aee6d6b authored by Laurent Aimar's avatar Laurent Aimar

Fixed a regression with --sub-autodetect-path

Ignore directories in --sub-autodetect-path that match the directory
of the current file (But it does not works with symbolic links).
parent b575b4da
......@@ -207,7 +207,7 @@ static char **paths_to_list( const char *psz_dir, char *psz_path )
if( !subdirs )
return NULL;
for( i = 0; *psz_parser != '\0' ; )
for( i = 0; psz_parser && *psz_parser != '\0' ; )
{
char *psz_subdir = psz_parser;
psz_parser = strchr( psz_subdir, ',' );
......@@ -323,7 +323,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
int i_dir_content;
int a;
if( psz_dir == NULL )
if( psz_dir == NULL || ( j >= 0 && !strcmp( psz_dir, f_dir ) ) )
continue;
/* parse psz_src dir */
......
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