mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
Finding only the specified FileLogs (for Boris)
git-svn-id: https://svn.fhem.de/fhem/trunk@1496 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
75df88d7ff
commit
8f47f7abb3
@ -1024,14 +1024,7 @@ FW_fileList($)
|
||||
$fname =~ m,^(.*)/([^/]*)$,; # Split into dir and file
|
||||
my ($dir,$re) = ($1, $2);
|
||||
return if(!$re);
|
||||
# note: this fails if the filenames of several FileLogs match the same regexp.
|
||||
# This is the case e.g. for
|
||||
# /var/log/fhem/foo-%Y.log
|
||||
# /var/log/fhem/foo-%Y-%m-%d.log
|
||||
# I do not fix it because this could easily be avoided by using a different
|
||||
# naming.
|
||||
# BN 2012-04-22
|
||||
$re =~ s/%./\.*/g;
|
||||
$re =~ s/%./[A-Za-z0-9]*/g;
|
||||
my @ret;
|
||||
return @ret if(!opendir(DH, $dir));
|
||||
while(my $f = readdir(DH)) {
|
||||
|
Loading…
Reference in New Issue
Block a user