From a5c7ef2343eaa767b68fb1708a40297665a1ac1d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 3 Jul 2013 10:20:43 +0200 Subject: [PATCH] Kopieren nach WebDAV: $form->{tmpfile} immer als lokalen Namen in $form->{tmpdir} interpretieren --- SL/Common.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/Common.pm b/SL/Common.pm index 0f172ddc6..534258341 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -19,6 +19,7 @@ use File::Copy (); use File::stat; use File::Slurp; use File::Spec; +use List::MoreUtils qw(apply); use POSIX (); use SL::DBUtils; @@ -633,8 +634,7 @@ sub copy_file_to_webdav_folder { $latest_file_name = File::Spec->catfile($complete_path, $newest_name); my $filesize = stat($latest_file_name)->size; - my ($ext) = $form->{tmpfile} =~ /(\.[^.]+)$/; - my $current_file = File::Spec->catfile($form->{tmpdir}, $form->{tmpfile}); + my $current_file = File::Spec->catfile($form->{tmpdir}, apply { s:.*/:: } $form->{tmpfile}); my $current_filesize = -f $current_file ? stat($current_file)->size : 0; if ($current_filesize == $filesize) { -- 2.20.1