[bug] vdr-burn-0.0.6h - badly mixed up multiple recordings when requanting

Message ID 1127227304.13731.16.camel@localhost.localdomain
State New
Headers

Commit Message

Ville Skyttä Sept. 20, 2005, 2:41 p.m. UTC
  On Tue, 2005-09-20 at 09:33 +0200, Leo Márquez wrote:

> I have compiled the 0.0.6h plugin version correctly with vdr-1.3.31 but 
> when I try to use it fails. In dvd.log I see:
> 
> Parameter validation not complete yet
> Initialising and analysing the streams....
> Can not open /video/Passatgers/2005-09-08.22:00.99.99.rec001.vdr: File 
> not exists

That error smells like it's coming from vdrsync.

All the examples in "vdrsync.pl --help" have trailing slashes in
recording dir names and in fact in the 050322 version, at least
get_file_list() (the latter in the file, in the VDRRECORDING package)
looks like it'll break if the path to the recording dir does not end
with a slash.

The attached patch could help (untested).
  

Patch

--- vdrsync.pl~	2005-03-22 21:45:40.000000000 +0200
+++ vdrsync.pl	2005-09-20 17:34:55.000000000 +0300
@@ -5561,13 +5561,13 @@ 
     closedir $DIR;
 	my @files =   sort (grep { /\d{3}.vdr$/  } @allfiles);
 
-	$self->{summary_file} = $indir . "summary.vdr" if (-e "$indir/summary.vdr");
-	$self->{marks_file} = $indir . "marks.vdr" if (-e "$indir/marks.vdr");
-	$self->{index_file} = $indir . "index.vdr" if (-e "$indir/index.vdr");
-	$self->{chapter_marks_file} = $indir . "chapter_marks.vdr" if (-e "$indir/chapter_marks.vdr");
+	$self->{summary_file} = "$indir/summary.vdr" if (-e "$indir/summary.vdr");
+	$self->{marks_file} = "$indir/marks.vdr" if (-e "$indir/marks.vdr");
+	$self->{index_file} = "$indir/index.vdr" if (-e "$indir/index.vdr");
+	$self->{chapter_marks_file} = "$indir/chapter_marks.vdr" if (-e "$indir/chapter_marks.vdr");
     
 	foreach (@files) {
-		$_ = $indir . $_;
+		$_ = "$indir/$_";
 		#print "trying to open $_\n";
 		my $DUMMYFH;
 		open $DUMMYFH, "$_" or die "Can not open $_: $!\n";