changeset 12431:663fdd72e594

Encrypted dvd playback now accepts -dvd-drive e: on mingw. fix from libdvdread, left out the various cosmetics changes for now
author faust3
date Thu, 06 May 2004 18:04:06 +0000
parents d82d84b94125
children 877d25c4b237
files libmpdvdkit2/dvd_reader.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdvdkit2/dvd_reader.c	Wed May 05 21:05:36 2004 +0000
+++ b/libmpdvdkit2/dvd_reader.c	Thu May 06 18:04:06 2004 +0000
@@ -273,6 +273,16 @@
 
     if( !path ) return 0;
 
+#ifdef WIN32
+    /* Stat doesn't work on devices under mingwin/cygwin. */
+    if( path[0] && path[1] == ':' && path[2] == '\0' )
+    {
+        /* Don't try to stat the file */
+        fileinfo.st_mode = S_IFBLK;
+    }
+    else
+#endif
+    {
     ret = stat( path, &fileinfo );
     if( ret < 0 ) {
 	/* If we can't stat the file, give up */
@@ -280,6 +290,7 @@
 	perror("");
 	return 0;
     }
+    }
 
     /* Try to open libdvdcss or fall back to standard functions */
     have_css = DVDInputSetup();