summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Smokeping/Master.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Smokeping/Master.pm b/lib/Smokeping/Master.pm
index efe1d9a..945cb78 100644
--- a/lib/Smokeping/Master.pm
+++ b/lib/Smokeping/Master.pm
@@ -105,11 +105,12 @@ sub save_updates {
" in the local data structure. Make sure you run the ".
"smokeping daemon. ($cfg->{General}{datadir})\n";
}
- elsif ( open (my $hand, '+<', $file) ) {
+ elsif ( open ($hand, '+>>' , $file) ) {
for (my $i = 10; $i < 0; $i--){
if ( flock $hand, LOCK_EX ){
my $existing = [];
if ( (stat($hand))[7] > 0 ){
+ seek $hand, 0,0;
eval { $existing = fd_retrieve $hand };
if ($@) { #error
warn "Loading $file: $@";