2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

fhem.pl: fix config file saving on windows (Forum #110071)

git-svn-id: https://svn.fhem.de/fhem/trunk@21646 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-04-12 11:05:08 +00:00
parent 803556c37d
commit 9b2f92a8df

View File

@ -5961,6 +5961,11 @@ restoreDir_saveFile($$)
return if(!$restoreDir || !$fName); return if(!$restoreDir || !$fName);
if($^O eq "MSWin32") { # Forum #110071
$fName =~ s,^.:,,g;
$fName =~ s,\\,/,g;
}
my $root = $attr{global}{modpath}; my $root = $attr{global}{modpath};
restoreDir_mkDir($root, "$restoreDir/$fName", 1); restoreDir_mkDir($root, "$restoreDir/$fName", 1);
if(!copy($fName, "$root/$restoreDir/$fName")) { if(!copy($fName, "$root/$restoreDir/$fName")) {