Revision a5c7ef23
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/Common.pm | ||
---|---|---|
use File::stat;
|
||
use File::Slurp;
|
||
use File::Spec;
|
||
use List::MoreUtils qw(apply);
|
||
use POSIX ();
|
||
|
||
use SL::DBUtils;
|
||
... | ... | |
$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) {
|
Auch abrufbar als: Unified diff
Kopieren nach WebDAV: $form->{tmpfile} immer als lokalen Namen in $form->{tmpdir} interpretieren