From 8c17fdc5319de107415005afc0e49a44f8fd83f2 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@18989 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index ff621d550..0de880220 100755 --- a/fhem/fhem.pl +++ b/fhem/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;