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

98_SVG.pm: fix SVGcache issue on Windows (Forum #11053)

git-svn-id: https://svn.fhem.de/fhem/trunk@8386 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-04-07 08:24:34 +00:00
parent 0bb56c300f
commit 76d5c79ac6

View File

@ -1073,8 +1073,10 @@ SVG_doShowLog($$$$;$)
(my $cachedate = TimeNow()) =~ s/ /_/g;
my $SVGcache = (AttrVal($FW_wname, "SVGcache", undef) && $t lt $cachedate);
my $cDir = "$FW_dir/SVGcache";
my $cName = "$cDir/$wl-$f-$t.svg";
if($SVGcache && open(CFH, $cName)) {
my $cFile = "$wl-$f-$t.svg";
$cFile =~ s/:/-/g; # For Windows / #11053
my $cPath = "$cDir/$cFile";
if($SVGcache && open(CFH, $cPath)) {
FW_pO join("", <CFH>);
close(CFH);
@ -1087,7 +1089,7 @@ SVG_doShowLog($$$$;$)
FW_pO $ret;
if($SVGcache) {
mkdir($cDir) if(! -d $cDir);
if(open(CFH, ">$cName")) {
if(open(CFH, ">$cPath")) {
print CFH $ret;
close(CFH);
}