Commit 04b1e7b2 authored by Marian Ďurkovič's avatar Marian Ďurkovič

dvdnav: Remove trailing backslash on Win32

parent 92f73e2a
...@@ -199,8 +199,11 @@ static int Open( vlc_object_t *p_this ) ...@@ -199,8 +199,11 @@ static int Open( vlc_object_t *p_this )
psz_name = ToLocaleDup( p_demux->psz_path ); psz_name = ToLocaleDup( p_demux->psz_path );
#ifdef WIN32 #ifdef WIN32
if( psz_name[0] && psz_name[1] == ':' && /* Remove trailing backslash, otherwise dvdnav_open will fail */
psz_name[2] == '\\' && psz_name[3] == '\0' ) psz_name[2] = '\0'; if( *psz_name && *(psz_name + strlen(psz_name) - 1) == '\\' )
{
*(psz_name + strlen(psz_name) - 1) = '\0';
}
#endif #endif
/* Try some simple probing to avoid going through dvdnav_open too often */ /* Try some simple probing to avoid going through dvdnav_open too often */
......
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