From d789da088cd066854348bbcadf6273d3dba7318d Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 22 Mar 2019 08:08:23 +0000 Subject: [PATCH] fhem.pl: add modpath root directory to @INC for FHEM:: Modules (Forum #97589) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@18989 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem.pl b/fhem.pl index ff621d550..0de880220 100755 --- a/fhem.pl +++ b/fhem.pl @@ -2753,7 +2753,8 @@ GlobalAttr($$$$) my $modpath = "$val/FHEM"; opendir(DH, $modpath) || return "Can't read $modpath: $!"; - push @INC, $modpath if(!grep(/\Q$modpath\E/, @INC)); + push @INC, $modpath if(!grep(/^\Q$modpath\E$/, @INC)); + push @INC, $val if(!grep(/^\Q$val\E$/, @INC)); $cvsid =~ m/(fhem.pl) (\d+) (\d+-\d+-\d+)/; $attr{global}{version} = "$1:$2/$3"; my $counter = 0;