warning for DVDs with corrupt data
[BackupPC.git] / bin / BackupPC_burnArchiveCLI
index 6ec1518..ab5a29f 100755 (executable)
@@ -295,6 +295,10 @@ foreach my $arc (@archives_to_burn) {
 
        $sth_archive_backup_parts->execute($dvd_nr);
 
+       if ($sth_archive_backup_parts->rows == 0) {
+               warn "ERROR: no backup parts found for $dvd_nr. You should re-create that DVD.\n";
+       }
+
        my @volumes;
        my $v;  # emtpy volume
        my $v_size = 0;
@@ -317,6 +321,8 @@ foreach my $arc (@archives_to_burn) {
        }
        push @volumes, $v if ($v);
 
+       #warn "# volumes: ",Dumper(\@volumes),"\n";
+
        my $volumes = $#volumes + 1;
        my $volume_nr = 1;