From 9f2c4a7dee2483c42ab6147d4949fd949fe067ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 24 Feb 2021 13:38:56 +0100 Subject: [PATCH] =?utf8?q?S:C:File:=20Import=20(scanner):=20Debug-Warnung,?= =?utf8?q?=20wenn=20Verzeichnis=20nicht=20ge=C3=B6ffnet=20werden=20kann?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/File.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.20.1