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

folder: use make_path

parent 581da20c
...@@ -90,20 +90,12 @@ static int FindMeta( vlc_object_t *p_this ) ...@@ -90,20 +90,12 @@ static int FindMeta( vlc_object_t *p_this )
if( !psz_dir ) if( !psz_dir )
return VLC_EGENERIC; return VLC_EGENERIC;
char *psz_path = psz_dir; char *psz_path = make_path( psz_dir );
if( strncmp( psz_path, "file://", 7 ) || !decode_URI( psz_path + 7 ) ) free( psz_dir );
{ if( psz_path == NULL )
free( psz_dir );
return VLC_EGENERIC; return VLC_EGENERIC;
}
#if defined(WIN32) && !defined(UNDER_CE) char *psz_buf = strrchr( psz_path, DIR_SEP_CHAR );
psz_path += 8;
#else
psz_path += 7;
#endif
char *psz_buf = strrchr( psz_path, '/' );
if( psz_buf ) if( psz_buf )
*++psz_buf = '\0'; *++psz_buf = '\0';
else else
...@@ -134,7 +126,5 @@ static int FindMeta( vlc_object_t *p_this ) ...@@ -134,7 +126,5 @@ static int FindMeta( vlc_object_t *p_this )
} }
} }
free( psz_dir );
return b_have_art ? VLC_SUCCESS : VLC_EGENERIC; return b_have_art ? VLC_SUCCESS : VLC_EGENERIC;
} }
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