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

* Fix subtitle detection. utf8_stat returns 0 if file is present.

  P.S. this bug was present for 3 months, without anyone noticing it. That's just BAD people.
parent 4551908a
......@@ -400,7 +400,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
"autodetected subtitle: %s with priority %d",
psz_path, i_prio );
if( utf8_stat( psz_path, &st ) && S_ISREG( st.st_mode ) )
if( !utf8_stat( psz_path, &st ) && S_ISREG( st.st_mode ) )
{
msg_Dbg( p_this,
"autodetected subtitle: %s with priority %d",
......@@ -412,7 +412,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
}
else
{
msg_Dbg( p_this, "fopen failed" );
msg_Dbg( p_this, "stat failed" );
}
}
if( i_sub_count >= MAX_SUBTITLE_FILES ) break;
......
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