This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository cups-x2go. commit 0b43aea4fbfa271b3bcb1fc018c23436a9948532 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Jun 18 18:09:06 2015 +0200 cups-x2go: use the same temp file template for PS, PDF and title files. Use appropriate suffixes if necessary when generating PDF and title temp files. (Fully) Fixes: #887. --- cups-x2go | 11 ++++------- debian/changelog | 3 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cups-x2go b/cups-x2go index b56ba8b..1442db3 100755 --- a/cups-x2go +++ b/cups-x2go @@ -198,16 +198,13 @@ my $uid = $userName; $jid =~ s/\W//g; #sanity check $uid =~ s/\W//g; #sanity check -my $template = "$jid-$uid-cupsjob$$"; -my $ps_template = $template . "X" x 16; -my $pdf_template = $template . ".pdf" . "X" x 16; -my $title_template = $template . ".pdf.title" . "X" x 16; +my $template = "$jid-$uid-cupsjob$$" . "X" x 16; my $need_ps_file_cleanup = 0; if (!$psFile) { $need_ps_file_cleanup = 1; - my ($tfh, $tempFile) = tempfile ($ps_template, UNLINK => 0, TMPDIR => 1); + my ($tfh, $tempFile) = tempfile ($template, UNLINK => 0, TMPDIR => 1); syslog('info', "Print job comes from STDIN, writing incoming job to temp file $tempFile\n"); binmode ($tfh, ":raw"); @@ -249,7 +246,7 @@ for (my $i = 0; $i < @ps2pdf_args; ++$i) { syslog('info', "Converting printjob with command: $ps2pdf_cmd " . join (" ", @ps2pdf_args) . "\n"); -my ($pdf_fh, $pdfFile) = tempfile ($pdf_template, UNLINK => 1, TMPDIR => 1); +my ($pdf_fh, $pdfFile) = tempfile ($template, UNLINK => 1, TMPDIR => 1, SUFFIX => '.pdf'); # the TMPDIR env var is needed for ghostscript... $ENV{TMPDIR}="/tmp"; @@ -319,7 +316,7 @@ if (!$need_ps_file_cleanup) { unlink ($psFile); } -my ($title_fh, $titleFile) = tempfile ($title_template, UNLINK => 1, TMPDIR => 1); +my ($title_fh, $titleFile) = tempfile ($template, UNLINK => 1, TMPDIR => 1, SUFFIX => '.pdf.title'); print $title_fh $jobTitle; close ($title_fh); diff --git a/debian/changelog b/debian/changelog index ba28efc..a4c4059 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,9 @@ cups-x2go (3.0.1.3-0x2go1) UNRELEASED; urgency=low block to clean up correctly. - cups-x2go: there is no continue in perl for stepping forward a loop. Still not. I keep forgetting that. Use next. (Partly) Fixes: #887. + - cups-x2go: use the same temp file template for PS, PDF and title files. + Use appropriate suffixes if necessary when generating PDF and title temp + files. (Fully) Fixes: #887. * debian/control: - Add dependencies on perl-modules for core modules and ${perl:Depends} for perl itself. -- Alioth's /srv/git/code.x2go.org/cups-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/cups-x2go.git