Added safedvdname declaration that removes special characters from the dvdname for 2 pass logfile name
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`