From 2a512929a633aecc567745f1904182ad33616bcb Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 13 Apr 2020 10:34:40 +0000 Subject: [PATCH] fhem.pl: change DevIo path in require (Forum #110125) git-svn-id: https://svn.fhem.de/fhem/trunk@21661 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/pre-commit | 5 +++-- fhem/fhem.pl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fhem/contrib/pre-commit b/fhem/contrib/pre-commit index e9633995d..15d6eaa26 100755 --- a/fhem/contrib/pre-commit +++ b/fhem/contrib/pre-commit @@ -67,8 +67,9 @@ foreach my $row (split("\n", $fList)) { die("Cant svnlook cat $fName:$!\n"); while(my $l = ) { - $hasId = ($l =~ /#.*?\$Id(?:\:.+)?\$/); - last if($hasId); + $hasId = ($l =~ /#.*?\$Id(?:\:.+)?\$/) if(!$hasId); + err $fName, "DevIo must be loaded via use (Forum #110125)." + if($l =~ m/require.*modpath.*DevIo.pm/); } close(FILE); err $fName, "file has no SVN Id as comment" unless($hasId); diff --git a/fhem/fhem.pl b/fhem/fhem.pl index bb66752f9..e16ca93aa 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -5585,7 +5585,7 @@ fhemFork() if($h->{DBH} && $h->{TYPE} eq 'DbLog'); #Forum #43271 TcpServer_Close($h) if($h->{SERVERSOCKET}); if($h->{DeviceName}) { - require "$attr{global}{modpath}/FHEM/DevIo.pm"; + require "DevIo.pm"; DevIo_CloseDev($h,1); } }