Commit 83431bd8 authored by Rafaël Carré's avatar Rafaël Carré

ncurses: make file browser open files

all files would be opened as directories

Pointed-out-by: cachereturn on #videolan
(cherry picked from commit 9b1ce0e8)
Signed-off-by: default avatarRafaël Carré <rafael.carre@gmail.com>
parent 0ad55c2d
......@@ -764,8 +764,15 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
if( p_sys->pp_dir_entries[p_sys->i_box_bidx]->b_file || i_key == ' ' )
{
char* psz_uri;
if( asprintf( &psz_uri, "directory://%s/%s", p_sys->psz_current_dir, p_sys->pp_dir_entries[p_sys->i_box_bidx]->psz_path ) == -1 )
if( asprintf( &psz_uri, "%s://%s/%s",
p_sys->pp_dir_entries[p_sys->i_box_bidx]->b_file ?
"file" : "directory",
p_sys->psz_current_dir,
p_sys->pp_dir_entries[p_sys->i_box_bidx]->psz_path
) == -1 )
{
psz_uri = NULL;
}
playlist_item_t *p_parent = p_sys->p_node;
if( !p_parent )
......
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