Revision a5c7ef23
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/Common.pm | ||
---|---|---|
19 | 19 |
use File::stat; |
20 | 20 |
use File::Slurp; |
21 | 21 |
use File::Spec; |
22 |
use List::MoreUtils qw(apply); |
|
22 | 23 |
use POSIX (); |
23 | 24 |
|
24 | 25 |
use SL::DBUtils; |
... | ... | |
633 | 634 |
$latest_file_name = File::Spec->catfile($complete_path, $newest_name); |
634 | 635 |
my $filesize = stat($latest_file_name)->size; |
635 | 636 |
|
636 |
my ($ext) = $form->{tmpfile} =~ /(\.[^.]+)$/; |
|
637 |
my $current_file = File::Spec->catfile($form->{tmpdir}, $form->{tmpfile}); |
|
637 |
my $current_file = File::Spec->catfile($form->{tmpdir}, apply { s:.*/:: } $form->{tmpfile}); |
|
638 | 638 |
my $current_filesize = -f $current_file ? stat($current_file)->size : 0; |
639 | 639 |
|
640 | 640 |
if ($current_filesize == $filesize) { |
Auch abrufbar als: Unified diff
Kopieren nach WebDAV: $form->{tmpfile} immer als lokalen Namen in $form->{tmpdir} interpretieren