2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-15 22:26:04 +00:00

fhem.pl: fix saving the statefiles with %L (Forum #129014)

git-svn-id: https://svn.fhem.de/fhem/trunk@26379 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2022-09-03 15:40:42 +00:00
parent f6e4a6080b
commit 58f712fb6a

View File

@ -1718,7 +1718,12 @@ CommandSave($$)
@structChangeHist = ();
DoTrigger("global", "SAVE", 1);
restoreDir_saveFile($restoreDir, $attr{global}{statefile}) if(!configDBUsed());
if(!configDBUsed()) {
my @t = localtime(gettimeofday());
my $stf = ResolveDateWildcards(AttrVal("global", "statefile", ""), @t);
restoreDir_saveFile($restoreDir, $stf);
}
$data{saveID} = createUniqueId(); # for configDB, #126323
my $ret = WriteStatefile();