2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-07 23:09:26 +00:00

HMInfo:correct templistconfig setting

git-svn-id: https://svn.fhem.de/fhem/trunk@16225 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2018-02-19 19:23:47 +00:00
parent 5737a38dc6
commit 9a1d33d6ea

View File

@ -898,14 +898,16 @@ sub HMinfo_tempListDefFn(@) { #################################################
my ($fn) = shift; my ($fn) = shift;
$fn = "" if (!defined $fn); $fn = "" if (!defined $fn);
my $ret = ""; my $ret = "";
if($fn !~ m/\//){ # filename already with path - dont change
my ($n) = devspec2array("TYPE=HMinfo"); my ($n) = devspec2array("TYPE=HMinfo");
$ret .= "$attr{global}{modpath}/" if ( !$fn || $fn !~ m/^\//); #no path? add modpath $ret .= AttrVal($n,"configDir",".")."/" if ( !$fn || $fn !~ m/^\//);#no dir? add defDir
$ret .= AttrVal($n,"configDir",".")."/" if ( !$ret || $ret !~ m/..*\// $ret = AttrVal("global","modpath",".")."/$ret" if ( !$ret || $ret !~ m/^\//);#no path? add modpath
&& (!$fn || $fn !~ m/^\//));#no dir? add defDir
if (!$fn){ #set filename if (!$fn){ #set filename
my ($f) = split(",",AttrVal($n,"configTempFile","tempList.cfg")); my ($f) = split(",",AttrVal($n,"configTempFile","tempList.cfg"));
$ret .= $f; $ret .= $f;
} }
}
return $ret.$fn; return $ret.$fn;
} }
sub HMinfo_listOfTempTemplates() { ############################################ sub HMinfo_listOfTempTemplates() { ############################################