dvd-sector-copy.c, dvdrip: Cue prompt to check image from `badblocks' file.
[dvdrip] / dvdrip
diff --git a/dvdrip b/dvdrip
index 250e642..ad7a280 100755 (executable)
--- a/dvdrip
+++ b/dvdrip
@@ -151,21 +151,13 @@ case $backup in
   nil)
     if [ ! -f "$tmp/$tag/iso" ]; then
       accumulate_badblocks
-      run_setrc "$DVD_SECTOR_COPY" -c -b"$tmp/$tag/badblocks.new" \
-               "$dev" "$tmp/$tag/iso.new"
+      run "$DVD_SECTOR_COPY" -c -b"$tmp/$tag/badblocks.new" \
+         "$dev" "$tmp/$tag/iso.new"
+      run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso"
       accumulate_badblocks
-      case $rc in
-       0)
-         run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso"
-         ;;
-       1)
-         run mv "$tmp/$tag/iso.new" "$tmp/$tag/iso"
-         fail "bad sectors found: check \`$tmp/$tag/iso', run again if ok"
-         ;;
-       *)
-         fail "$DVD_SECTOR_COPY: exit $rc"
-         ;;
-      esac
+      if [ -f "$tmp/$tag/badblocks" ]; then
+       fail "bad sectors found: check \`$tmp/$tag/iso', run again if ok"
+      fi
     fi
     ;;
 esac