From feceb0bda28cea09e43b9497e38510ef404d5c4a Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Tue, 27 Jan 2015 11:49:21 +0000 Subject: [PATCH] restore data saving --- loop.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/loop.pl b/loop.pl index 1fb8998..bb28f18 100755 --- a/loop.pl +++ b/loop.pl @@ -157,6 +157,8 @@ dbg "after app start"; write_ld(); $dataf->close if $dataf; +undef $dataf; + # move all the files along one cycle_loop_data_files(); @@ -534,7 +536,7 @@ sub gen_hash_diff my $count; while (my ($k, $v) = each %$now) { - if ($last->{$k} ne $now->{$k}) { + if (!exists $last->{$k} || $last->{$k} ne $now->{$k}) { $o{$k} = $v; ++$count; } @@ -698,6 +700,7 @@ sub write_ld sub cycle_loop_data_files { $dataf->close if $dataf; + undef $dataf; rename "$datafn.oooo", "$datafn.ooooo"; rename "$datafn.ooo", "$datafn.oooo"; -- 2.43.0