shithub: libdvdcss

Download patch

ref: 93ad73f7db62a40c2fa97298004d0509ddb8db6c
parent: 4b0fa47cb1e6e860bdf80015010869033ead73e1
author: Steve Lhomme <robux@videolan.org>
date: Wed Sep 13 09:11:25 EDT 2006

now accepts X:\ as a device name, as well as X:


--- a/src/device.c
+++ b/src/device.c
@@ -295,8 +295,11 @@
     print_debug( dvdcss, "opening target `%s'", psz_device );
 
 #if defined( WIN32 )
-    /* If device is not "X:", we are actually opening a file. */
-    dvdcss->b_file = !psz_device[0] || psz_device[1] != ':' || psz_device[2];
+    dvdcss->b_file = 1;
+    /* If device is "X:" or "X:\", we are not actually opening a file. */
+    if (psz_device[0] && psz_device[1] == ':' &&
+       (!psz_device[2] || (psz_device[2] == '\\' && !psz_device[3])))
+        dvdcss->b_file = 0;
 
     /* Initialize readv temporary buffer */
     dvdcss->p_readv_buffer   = NULL;