From f5b999c9d46a8ba34314621db141e37c48a06e81 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 3 Jul 2013 09:37:13 +0200 Subject: [PATCH] Ergebnis von File::stat nur dereferenzieren, wenn Datei existiert MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Existiert sie nicht, gibt die Funktion nun mal undef zurück. --- SL/Common.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/Common.pm b/SL/Common.pm index 87465c071..c0be296ce 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -632,7 +632,7 @@ sub copy_file_to_webdav_folder { my ($ext) = $form->{tmpfile} =~ /(\.[^.]+)$/; my $current_file = join('/', $form->{tmpdir}, $form->{tmpfile}); - my $current_filesize = stat($current_file)->size; + my $current_filesize = -f $current_file ? stat($current_file)->size : 0; if ($current_filesize == $filesize) { $::lxdebug->leave_sub(); -- 2.20.1