[DVDnav-discuss] r989 - trunk/libdvdnav/src/dvdread/dvd_reader.c

nicodvb subversion at mplayerhq.hu
Mon Dec 31 19:17:35 CET 2007


Author: nicodvb
Date: Mon Dec 31 19:17:34 2007
New Revision: 989

Log:
in DVDOpen(), if path_copy ends up being an empty string transform it to /; part of ogle-1778 fixed by me

Modified:
   trunk/libdvdnav/src/dvdread/dvd_reader.c

Modified: trunk/libdvdnav/src/dvdread/dvd_reader.c
==============================================================================
--- trunk/libdvdnav/src/dvdread/dvd_reader.c	(original)
+++ trunk/libdvdnav/src/dvdread/dvd_reader.c	Mon Dec 31 19:17:34 2007
@@ -447,6 +447,11 @@ dvd_reader_t *DVDOpen( const char *ppath
 	      path_copy[ strlen( path_copy ) - 9 ] = '\0';
 	    }
 	}
+	
+	if(path_copy[0] == '\0') {
+	    path_copy[0] = '/';
+	    path_copy[1] = '\0';
+	}
 
 #if defined(SYS_BSD)
 	if( ( fe = getfsfile( path_copy ) ) ) {



More information about the DVDnav-discuss mailing list