[vlc-devel] commit: dvdnav: Remove trailing backslash on Win32 ( Marian Ďurkovič )

Rémi Denis-Courmont remi at remlab.net
Mon Oct 19 10:01:56 CEST 2009


On Mon, 19 Oct 2009 09:11:14 +0200 (CEST), git at videolan.org (git version
control) wrote:
>  #ifdef WIN32
> -    if( psz_name[0] && psz_name[1] == ':' &&
> -        psz_name[2] == '\\' && psz_name[3] == '\0' ) psz_name[2] = '\0';
> +    /* Remove trailing backslash, otherwise dvdnav_open will fail */
> +    if( *psz_name && *(psz_name + strlen(psz_name) - 1) == '\\' )
> +    {
> +        *(psz_name + strlen(psz_name) - 1) = '\0';
> +    }
>  #endif

AFAICT, you can remove the trailing path separator on any platform.

-- 
Rémi Denis-Courmont




More information about the vlc-devel mailing list