Bug#95662: xdvi: can't handle spaces in file names
Package: tetex-bin
Version: 1.0.7+20001218-3
Severity: normal
Tags: patch
xdvi doesn't accept spaces in file names:
rittau@jroger:~$ xdvi foo\ bar.dvi
Usage: xdvi [+[<page>]] [-s <shrink>] [-S <density>] [-nogrey] [-gamma <g>]
[-install] [-noinstall] [-grid1 <color>] [-grid2 <color>]
[...]
srittau@jroger:~$
I've appended a patch to the /usr/bin/xdvi wrapper that fixes this.
- Sebastian
--- /usr/bin/xdvi Thu Apr 12 15:45:52 2001
+++ xdvi Sat Apr 28 21:00:49 2001
@@ -57,19 +57,19 @@
case "${filename}X" in
*.gzX)
tempfile=`tempfile -p tetex -s .dvi`
- gzip -d -c $filename > $tempfile
+ gzip -d -c "$filename" > $tempfile
compress=1
;;
*.bz2X)
tempfile=`tempfile -p tetex -s .dvi`
- bzip2 -d -c $filename > $tempfile
+ bzip2 -d -c "$filename" > $tempfile
compress=1
;;
esac
if test $compress = 1; then
trap "rm -f $tempfile" 0 1 2 15
- filename=$tempfile
+ filename="$tempfile"
fi
-xdvi.bin $NAMEOPT $args $filename || exit 1
+xdvi.bin $NAMEOPT $args "$filename" || exit 1
exit 0
Reply to: