[vlc-commits] FTP: support UTF-8 filenames in directory listings
Jean-Baptiste Kempf
git at videolan.org
Thu Aug 11 16:31:17 CEST 2016
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Aug 11 15:54:59 2016 +0200| [e8da99ea883f513e00ce1f380c0dd4549311d90b] | committer: Jean-Baptiste Kempf
FTP: support UTF-8 filenames in directory listings
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e8da99ea883f513e00ce1f380c0dd4549311d90b
---
modules/access/ftp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index 1d14f52..3a54987 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -920,18 +920,20 @@ static int DirRead (access_t *p_access, input_item_node_t *p_current_node)
psz_file = psz_line;
char *psz_uri;
+ char *psz_filename = vlc_uri_encode( psz_file );
if( asprintf( &psz_uri, "%s://%s:%d%s%s/%s",
( p_sys->tlsmode == NONE ) ? "ftp" :
( ( p_sys->tlsmode == IMPLICIT ) ? "ftps" : "ftpes" ),
p_sys->url.psz_host, p_sys->url.i_port,
p_sys->url.psz_path ? "/" : "",
p_sys->url.psz_path ? p_sys->url.psz_path : "",
- psz_file ) != -1 )
+ psz_filename ) != -1 )
{
i_ret = access_fsdir_additem( &fsdir, psz_uri, psz_file,
type, ITEM_NET );
free( psz_uri );
}
+ free( psz_filename );
free( psz_line );
}
More information about the vlc-commits
mailing list