From 6929286ef74df3abb6eeda070cf3e81b38e9b2a9 Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Tue, 16 Oct 2012 07:16:36 +0000 Subject: [PATCH] .hex enabled, DIR message removed git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1978 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/99_update.pm | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/FHEM/99_update.pm b/FHEM/99_update.pm index 961c28b7d..49ec3ab7e 100644 --- a/FHEM/99_update.pm +++ b/FHEM/99_update.pm @@ -227,13 +227,14 @@ update_DoHousekeeping($) foreach my $f (sort keys %{$lControl{$pack}}) { my $lCtrl = $lControl{$pack}{$f}{ctrl}; my $str; - next if ($f =~ m/.hex$/); # skip firmware files next if ($lCtrl ne "DIR"); if ($lCtrl eq "DIR") { $str = update_CleanUpLocalFiles($lCtrl,"$f",""); - $cleanup .= "==> $str\n"; - Log 1, "update $str"; + if($str) { + $cleanup .= "==> $str\n" ; + Log 1, "update $str"; + } } } @@ -241,7 +242,6 @@ update_DoHousekeeping($) foreach my $f (sort keys %{$lControl{$pack}}) { my $lCtrl = $lControl{$pack}{$f}{ctrl}; my $str; - next if ($f =~ m/.hex$/); # skip firmware files next if ($lCtrl ne "MOV"); if ($lCtrl eq "MOV" && $f !~ /\*/) { @@ -255,7 +255,6 @@ update_DoHousekeeping($) foreach my $f (sort keys %{$lControl{$pack}}) { my $lCtrl = $lControl{$pack}{$f}{ctrl}; my $str; - next if ($f =~ m/.hex$/); # skip firmware files next if ($lCtrl ne "MOV"); if ($lCtrl eq "MOV" && $f =~ /\*/) { @@ -275,7 +274,6 @@ update_DoHousekeeping($) foreach my $f (sort keys %{$lControl{$pack}}) { my $lCtrl = $lControl{$pack}{$f}{ctrl}; my $str; - next if ($f =~ m/.hex$/); # skip firmware files next if ($lCtrl ne "DEL"); if ($f =~ /\*/) { @@ -341,8 +339,6 @@ update_CheckUpdates($$$$) my %rControl = %$rControl_ref; my %lControl = %$lControl_ref; foreach my $f (sort keys %{$rControl{$pack}}) { - # skip firmware files - next if ($f =~ m/.hex$/); # skip housekeeping next if ($rControl{$pack}{$f}{ctrl} eq "DEL" || $rControl{$pack}{$f}{ctrl} eq "DIR" || @@ -607,7 +603,6 @@ update_ListChanges($) my %rControl = %$rControl_ref; my %lControl = %$lControl_ref; foreach my $f (sort keys %{$rControl{$pack}}) { - next if ($f =~ m/.hex$/); # skip firmware files next if ($rControl{$pack}{$f}{ctrl} eq "DEL" || $rControl{$pack}{$f}{ctrl} eq "DIR" || $rControl{$pack}{$f}{ctrl} eq "MOV"); @@ -817,9 +812,7 @@ update_CleanUpLocalFiles($$$) # make dir if ($ctrl eq "DIR") { my $mret = update_MakeDirectory($file); - if (!$mret) { - $ret = "create directory $modpath/$file"; - } else { + if ($mret) { $ret = "create directory $modpath/$file failed: $mret"; } }