From: Bernd Bleßmann Date: Wed, 24 Feb 2021 12:38:56 +0000 (+0100) Subject: S:C:File: Import (scanner): Debug-Warnung, wenn Verzeichnis nicht geöffnet werden... X-Git-Tag: kivitendo-mebil_0.1-0~9^2~449 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9f2c4a7dee2483c42ab6147d4949fd949fe067ce;p=kivitendo-erp.git S:C:File: Import (scanner): Debug-Warnung, wenn Verzeichnis nicht geöffnet werden kann --- diff --git a/SL/Controller/File.pm b/SL/Controller/File.pm index a01e661b7..94581102c 100644 --- a/SL/Controller/File.pm +++ b/SL/Controller/File.pm @@ -408,7 +408,7 @@ sub _get_from_import { my $language = $::lx_office_conf{system}->{language}; my $timezone = $::locale->get_local_time_zone()->name; if (opendir my $dir, $path) { - my @files = ( readdir $dir); + my @files = (readdir $dir); foreach my $file ( @files) { next if (($file eq '.') || ($file eq '..')); $file = Encode::decode('utf-8', $file); @@ -430,7 +430,12 @@ sub _get_from_import { }; } + closedir($dir); + + } else { + $::lxdebug->message(LXDebug::WARN(), "SL::File::_get_from_import opendir failed to open dir " . $path); } + return @foundfiles; }