[vlc-devel] [PATCH] sftp: fix opening urls with encoded chars

Thomas Guillem thomas at gllm.fr
Mon Feb 29 12:04:56 CET 2016



On Mon, Feb 29, 2016, at 09:48, Petri Hintukainen wrote:
> On ma, 2016-02-29 at 06:43 +0200, Rémi Denis-Courmont wrote:
> > Le 2016-02-28 14:52, Petri Hintukainen a écrit :
> > > Without this change opening paths with special chars (space, ...) 
> > > fail.
> > > Ex. path "/media/Let's Be Cops" was opened as 
> > > "/media/Let%27s%20Be%20Cops".
> > > ---
> > >  modules/access/sftp.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/modules/access/sftp.c b/modules/access/sftp.c
> > > index 942e24f..37b6940 100644
> > > --- a/modules/access/sftp.c
> > > +++ b/modules/access/sftp.c
> > > @@ -127,6 +127,7 @@ static int Open( vlc_object_t* p_this )
> > > 
> > >      /* Parse the URL */
> > >      vlc_UrlParse( &url, p_access->psz_location );
> > > +    vlc_uri_decode( url.psz_path );
> > 
> > Isn't that supposed to be p_access->psz_path ?
> 
> 
> /usr/src/vlc/modules/access/sftp.c:133:36: error: ‘access_t {aka struct
> access_t}’ has no member named ‘psz_path’
> 
> Also, p_access->psz_filepath is always NULL in sftp Open().

Maybe, we should fix how we set filepath in access_New. Currently, it
works only for local files. I think it should also work with accesses
that don't need encoded urls, like sftp, nfs, and smb.

> 
> > > 
> > >      /* Check for some parameters */
> > >      if( EMPTY_STR( url.psz_host ) )
> > 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list