X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/844a541e0d8f59644540413f675e8f07cd154cf6..50b0d77d76ce3e5b6eb0b637386d540672a59234:/SL/Common.pm diff --git a/SL/Common.pm b/SL/Common.pm index a0d54feb6..15f8f7b93 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -593,8 +593,10 @@ sub copy_file_to_webdav_folder { return; } + $form->{attachment_filename} ||= $form->generate_attachment_filename; + my $timestamp = get_current_formatted_time(); - my $new_file = File::Spec->catfile($form->{cwd}, $webdav_folder, $form->generate_attachment_filename()); + my $new_file = File::Spec->catfile($form->{cwd}, $webdav_folder, $form->{attachment_filename}); $new_file =~ s{(.*)\.}{$1$timestamp\.}; if (!File::Copy::copy($current_file, $new_file)) {