1
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-04 22:19:38 +00:00

01_FHEMWEB.pm: fix searching for path with %L in the Name (Forum #89744)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@17047 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2018-07-29 09:52:46 +00:00
parent 0c96dcba05
commit 8c7351626f

View File

@ -2001,11 +2001,11 @@ sub
FW_fileList($;$)
{
my ($fname,$mtime) = @_;
$fname =~ s/%L/$attr{global}{logdir}/g #Forum #89744
if($fname =~ m/%/ && $attr{global}{logdir});
$fname =~ m,^(.*)/([^/]*)$,; # Split into dir and file
my ($dir,$re) = ($1, $2);
return $fname if(!$re);
$dir =~ s/%L/$attr{global}{logdir}/g # %L present and log directory defined
if($dir =~ m/%/ && $attr{global}{logdir});
$re =~ s/%./[A-Za-z0-9]*/g; # logfile magic (%Y, etc)
my @ret;
return @ret if(!opendir(DH, $dir));