[LON-CAPA-cvs] cvs: loncom /interface printout.pl
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Thu, 10 May 2007 09:53:39 -0000
foxr Thu May 10 05:53:39 2007 EDT
Modified files:
/loncom/interface printout.pl
Log:
The changes around 1.122 which use the print spool directory from
perlvar inadvertently dropped a / in the directory specify causing
images to be generated in the wrong directory (e.g.
instead of /home/prtspool/msu... /home/prtspoolmsu .. added back the
appropriate path seperators.
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.124 loncom/interface/printout.pl:1.125
--- loncom/interface/printout.pl:1.124 Mon Apr 23 16:06:00 2007
+++ loncom/interface/printout.pl Thu May 10 05:53:39 2007
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
#
-# $Id: printout.pl,v 1.124 2007/04/23 20:06:00 albertel Exp $
+# $Id: printout.pl,v 1.125 2007/05/10 09:53:39 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -217,13 +217,13 @@
# $eps_f =~ s/\.[^.]*$/\.eps/i;
if ($eps_f=~/\/home\/([^\/]+)\/public_html\//) {
$eps_f=~s/\/home\/([^\/]+)\/public_html/$1/;
- $eps_f = $perlvar{'lonPrtDir'}.$eps_f;
+ $eps_f = $perlvar{'lonPrtDir'}.'/'.$eps_f;
} elsif ($eps_f=~/$perlvar{'lonDocRoot'}\/res\//) {
$eps_f=~m/$perlvar{'lonDocRoot'}\/res\/(.+)/;
- $eps_f = $perlvar{'lonPrtDir'}.$1;
+ $eps_f = $perlvar{'lonPrtDir'}.'/'.$1;
} elsif ($eps_f=~/$perlvar{'lonUsersDir'}\//) {
$eps_f=~/$perlvar{'lonUsersDir'}\/([^\/]+)\/\w\/\w\/\w\/(.+)/;
- $eps_f = $perlvar{'lonPrtDir'}.$1.'/'.$2;
+ $eps_f = $perlvar{'lonPrtDir'}.'/'.$1.'/'.$2;
}
$eps_f =~ s/ /\_/g; # Spaces are problematic for system commands and LaTeX.
#