From 3afca6ae09e3c7dfb76a81aa15baeaabecae7e3d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 11 May 2017 12:59:48 +0200 Subject: [PATCH] Druckfunktion: Zeitstempel im Dateinamen MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Das hilft herauszufinden, welche die neueste Datei ist, wenn man Druckvorlagen debuggt und dann viele temporäre Dateien herumliegen hat. --- SL/Form.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SL/Form.pm b/SL/Form.pm index 645d7a061..3e0c34395 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -49,6 +49,7 @@ use Encode; use File::Copy; use IO::File; use Math::BigInt; +use POSIX qw(strftime); use SL::Auth; use SL::Auth::DB; use SL::Auth::LDAP; @@ -1026,7 +1027,7 @@ sub parse_template { $suffix = $self->{IN}; $suffix =~ s/.*\.//; ($temp_fh, $self->{tmpfile}) = File::Temp::tempfile( - 'kivitendo-printXXXXXX', + strftime('kivitendo-print-%Y%m%d%H%M%S-XXXXXX', localtime()), SUFFIX => '.' . ($suffix || 'tex'), DIR => $userspath, UNLINK => ($::lx_office_conf{debug} && $::lx_office_conf{debug}->{keep_temp_files})? 0 : 1, -- 2.20.1