projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d22f89a
)
Ergebnis von File::stat nur dereferenzieren, wenn Datei existiert
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 3 Jul 2013 07:37:13 +0000
(09:37 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 3 Jul 2013 07:37:13 +0000
(09:37 +0200)
Existiert sie nicht, gibt die Funktion nun mal undef zurück.
SL/Common.pm
patch
|
blob
|
history
diff --git
a/SL/Common.pm
b/SL/Common.pm
index
87465c0
..
c0be296
100644
(file)
--- 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();