use different save file name if not json

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@3794 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2013-08-26 14:38:14 +00:00
parent 26bd007794
commit cff2ae55f4

View File

@ -226,7 +226,8 @@ myStatefileName()
{ {
my $statefile = $attr{global}{statefile}; my $statefile = $attr{global}{statefile};
$statefile = substr $statefile,0,rindex($statefile,'/')+1; $statefile = substr $statefile,0,rindex($statefile,'/')+1;
return $statefile ."LightScenes.save"; return $statefile ."LightScenes.save" if( $LightScene_hasJSON );
return $statefile ."LightScenes.dd.save";
} }
my $LightScene_LastSaveTime=""; my $LightScene_LastSaveTime="";
sub sub
@ -285,7 +286,6 @@ LightScene_Load($)
next if($line =~ m/^#.*$/); next if($line =~ m/^#.*$/);
$encoded .= $line; $encoded .= $line;
} }
close(FH); close(FH);
return if( !defined($encoded) ); return if( !defined($encoded) );