mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
98_update.pm: mark excluded files in check (Forum #96561)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@18431 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1828bad8b8
commit
b36e93c936
@ -324,6 +324,11 @@ doUpdate($$$$)
|
|||||||
|
|
||||||
next if($r[0] ne "UPD");
|
next if($r[0] ne "UPD");
|
||||||
my $fName = $r[3];
|
my $fName = $r[3];
|
||||||
|
my $wouldExcl;
|
||||||
|
foreach my $ex (@excl) {
|
||||||
|
$wouldExcl = 1 if($fName =~ m/$ex/ || "$src:$fName" =~ m/$ex/);
|
||||||
|
}
|
||||||
|
|
||||||
if($fName =~ m+\.\.+) {
|
if($fName =~ m+\.\.+) {
|
||||||
uLog 1, "Suspicious line $r, aborting";
|
uLog 1, "Suspicious line $r, aborting";
|
||||||
return 1;
|
return 1;
|
||||||
@ -334,12 +339,7 @@ doUpdate($$$$)
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
my $isExcl;
|
my $isExcl = (!$isCheck && $wouldExcl);
|
||||||
if(!$isCheck) { # Forum #95944
|
|
||||||
foreach my $ex (@excl) {
|
|
||||||
$isExcl = 1 if($fName =~ m/$ex/ || "$src:$fName" =~ m/$ex/);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
my $fPath = "$root/$fName";
|
my $fPath = "$root/$fName";
|
||||||
$fPath = $0 if($fPath =~ m/$mainPgm/);
|
$fPath = $0 if($fPath =~ m/$mainPgm/);
|
||||||
my $fileOk = ($lh{$fName} &&
|
my $fileOk = ($lh{$fName} &&
|
||||||
@ -370,7 +370,8 @@ doUpdate($$$$)
|
|||||||
$nChanged++;
|
$nChanged++;
|
||||||
my $sfx = ($arg eq "checktime" ? " $r[1]" : "");
|
my $sfx = ($arg eq "checktime" ? " $r[1]" : "");
|
||||||
$sfx =~ s/_.*//;
|
$sfx =~ s/_.*//;
|
||||||
uLog 1, "$r[0] $fName$sfx";
|
uLog 1, "$r[0] $fName$sfx".
|
||||||
|
($isCheck && $wouldExcl ? " (excluded from update)" : "");
|
||||||
next if($isCheck);
|
next if($isCheck);
|
||||||
|
|
||||||
my $remFile = upd_getUrl("$basePath/$fName");
|
my $remFile = upd_getUrl("$basePath/$fName");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user