From edce80128c3ac2e2fa9ec47582eefaea654e4f89 Mon Sep 17 00:00:00 2001
From: "Alan J. Pippin" <ajp@pippins.net>
Date: Tue, 19 May 2009 17:02:26 -0600
Subject: [PATCH] Added dvdname to 2 pass logfile to enable multiple instances
 of rip_dvd to run concurrently Added safedvdname declaration that removes
 special characters from the dvdname for 2 pass logfile name

---
 rip_dvd | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rip_dvd b/rip_dvd
index a97a343..bd4442a 100755
--- a/rip_dvd
+++ b/rip_dvd
@@ -239,9 +239,12 @@ if [ -z "$vobfile" ]; then
   vobfile="$dest/$dvdname.VOB"
 fi
 
+# make a "safe" dvdname (remove special characters)
+safedvdname=`basename "$dvdname" | sed 's/[ !&*\\$?]/_/g'`
+
 # set up some variables to hold various logfiles
 logfile="$logdir/$dvdname.log"
-passlogfile="$tmpdir/divx2pass.log"
+passlogfile="$tmpdir/$safedvdname.log"
 ddrescuelog=`tempfile`
 dvdauthorlog=`tempfile`
 encodelog=`tempfile`
-- 
2.34.1