Package: vobcopy
Version: 0.5.14-2

Some DVDs have filenames ending with a semicolon and a question mark
(";?"). vobcopy does not deal with them correctly. Attached is a patch
containing the changes I did to make them work with at least one of the
disks I have (the only one I've tested so far, however, but it works at
least).

diff -ru vobcopy-0.5.14/vobcopy.c vobcopy-0.5.14.fixed/vobcopy.c
--- vobcopy-0.5.14/vobcopy.c	2004-11-22 21:12:46.000000000 +0200
+++ vobcopy-0.5.14.fixed/vobcopy.c	2005-07-24 13:04:53.000000000 +0300
@@ -1112,6 +1112,14 @@
                       {
 			 off_t culm_single_vob_size = 0;
 			 int a, subvob; 
+			 int len, offset;
+			 
+			 len = strlen(input_file);
+			 if (len > 2 && strcmp(input_file + len - 2, ";?") == 0)
+			    offset = len - 7;
+                        else
+                            offset = len - 5;
+			 
 //			 printf( "debug: title = %d \n", title_nr );
 			 
 			 subvob = ( directory->d_name[7] - 48 );
@@ -1119,7 +1127,7 @@
 			 
 			 for( a = 1; a < subvob; a++ )
 			   {
-			      input_file[ strlen( input_file ) - 5 ] = ( a + 48 );
+			      input_file[ offset ] = ( a + 48 );
 			      if( stat( input_file, &buf ) < 0 )
 				{
 				   fprintf( stderr, "Can't stat() %s.\n", input_file );

Reply via email to