[vlc-devel] [PATCH] Improve FTP servers compatibility

Rémi Denis-Courmont remi at remlab.net
Sat Nov 28 12:03:40 CET 2015


On Saturday 28 November 2015 11:47:29 Sylver Bruneau wrote:
> @@ -644,11 +647,56 @@ static int InOpen( vlc_object_t *p_this )
>      if( Connect( p_this, p_sys ) )
>          goto exit_error;
> 
> +    /* count number of elements in path */
> +    p_temp_path = (char *)calloc( 1, strlen( p_sys->url.psz_path ) + 1 );
> +    strcpy(p_temp_path, p_sys->url.psz_path);
> +    for (p_path_element = strtok(p_temp_path, "/"); p_path_element;
> p_path_element = strtok(NULL, "/")) +    {
> +        i_element_count++;
> +    }
> +
> +    /* go to root path (this is needed on some FTP servers) */
> +    if( ftp_SendCommand( p_this, p_sys, "CWD /") < 0 )
> +        goto error;
> +    else

Nack. This breaks home directory FTP URLs.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list