mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
correct modpath usage in fhem
git-svn-id: https://svn.fhem.de/fhem/trunk@6462 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dc648ff1be
commit
b88fd6888b
@ -6116,7 +6116,7 @@ sub CUL_HM_getChnLvl($){# in: name out: vit or phys level
|
||||
|
||||
#--------------- Conversion routines for register settings---------------------
|
||||
sub CUL_HM_initRegHash() { #duplicate short and long press register
|
||||
my $mp = "./$attr{global}{modpath}/FHEM";
|
||||
my $mp = "$attr{global}{modpath}/FHEM";
|
||||
opendir(DH, $mp) || return;
|
||||
foreach my $m (grep /^HMConfig_(.*)\.pm$/,readdir(DH)) {
|
||||
my $file = "${mp}/$m";
|
||||
|
@ -1246,7 +1246,8 @@ sub HMinfo_SetFn($@) {#########################################################
|
||||
}
|
||||
elsif($cmd eq "tempList") {##handle thermostat templist from file ---------
|
||||
my $fn = $a[1]?$a[1]:"tempList.cfg";
|
||||
$fn = AttrVal($name,"configDir",".")."\/".$fn if ($fn !~ m/\//);
|
||||
$fn = "$attr{global}{modpath}/".AttrVal($name,"configDir",".")."\/".$fn
|
||||
if ($fn !~ m/\//);
|
||||
$ret = HMinfo_tempList($name,$filter,$a[0],$fn);
|
||||
}
|
||||
elsif($cmd eq "tempListTmpl"){##handle thermostat templist from file --------
|
||||
@ -1260,18 +1261,20 @@ sub HMinfo_SetFn($@) {#########################################################
|
||||
}
|
||||
elsif($cmd eq "loadConfig") {##action: loadConfig----------------------------
|
||||
my $fn = $a[0]?$a[0]:AttrVal($name,"configFilename","regSave.cfg");
|
||||
$fn = AttrVal($name,"configDir",".")."\/".$fn if ($fn !~ m/\//);
|
||||
$fn = "$attr{global}{modpath}/".AttrVal($name,"configDir",".")."\/".$fn if ($fn !~ m/\//);
|
||||
$ret = HMinfo_loadConfig($filter,$fn);
|
||||
}
|
||||
elsif($cmd eq "verifyConfig"){##action: verifyConfig-------------------------
|
||||
my $fn = $a[0]?$a[0]:AttrVal($name,"configFilename","regSave.cfg");
|
||||
$fn = AttrVal($name,"configDir",".")."\/".$fn if ($fn !~ m/\//);
|
||||
$fn = "$attr{global}{modpath}/".AttrVal($name,"configDir",".")."\/".$fn
|
||||
if ($fn !~ m/\//);
|
||||
$ret = HMinfo_verifyConfig($filter,$fn);
|
||||
}
|
||||
elsif($cmd eq "purgeConfig"){##action: purgeConfig---------------------------
|
||||
my $id = ++$hash->{nb}{cnt};
|
||||
my $fn = $a[0]?$a[0]:AttrVal($name,"configFilename","regSave.cfg");
|
||||
$fn = AttrVal($name,"configDir",".")."\/".$fn if ($fn !~ m/\//);
|
||||
$fn = "$attr{global}{modpath}/".AttrVal($name,"configDir",".")."\/".$fn
|
||||
if ($fn !~ m/\//);
|
||||
my $bl = BlockingCall("HMinfo_purgeConfig", join(",",("$name:$id",$fn)),
|
||||
"HMinfo_bpPost", 30,
|
||||
"HMinfo_bpAbort", "$name:$id");
|
||||
@ -1281,7 +1284,8 @@ sub HMinfo_SetFn($@) {#########################################################
|
||||
elsif($cmd eq "saveConfig") {##action: saveConfig----------------------------
|
||||
my $id = ++$hash->{nb}{cnt};
|
||||
my $fn = $a[0]?$a[0]:AttrVal($name,"configFilename","regSave.cfg");
|
||||
$fn = AttrVal($name,"configDir",".")."\/".$fn if ($fn !~ m/\//);
|
||||
$fn = "$attr{global}{modpath}/".AttrVal($name,"configDir",".")."\/".$fn
|
||||
if ($fn !~ m/\//);
|
||||
my $bl = BlockingCall("HMinfo_saveConfig", join(",",("$name:$id",$fn,$opt,$filter)),
|
||||
"HMinfo_bpPost", 30,
|
||||
"HMinfo_bpAbort", "$name:$id");
|
||||
@ -1637,7 +1641,8 @@ sub HMinfo_archConfig($$$$) {##################################################
|
||||
# save config only if register are complete
|
||||
my ($hash,$name,$opt,$fN) = @_;
|
||||
$fN = $fN?$fN:AttrVal($name,"configFilename","regSave.cfg");
|
||||
$fN = AttrVal($name,"configDir",".")."\/".$fN if ($fN !~ m/\//);
|
||||
$fN = "$attr{global}{modpath}/".AttrVal($name,"configDir",".")."\/".$fN
|
||||
if ($fN !~ m/\//);
|
||||
my $id = ++$hash->{nb}{cnt};
|
||||
my $bl = BlockingCall("HMinfo_archConfigExec", join(",",("$name:$id"
|
||||
,$fN
|
||||
|
Loading…
x
Reference in New Issue
Block a user