Update fetchupd.php

Fix improper exclusion for Diffs files, those should be excluded in get.php only
This commit is contained in:
abbodi1406 2021-01-29 19:52:19 +03:00 committed by GitHub
parent 2db4552cbc
commit e287a890ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -295,14 +295,13 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
$shaArray = array(); $shaArray = array();
foreach($fileList[0] as $val) { foreach($fileList[0] as $val) {
preg_match('/FileName=".*?"/', $val, $name);
$name = preg_replace('/FileName="|"$/', '', $name[0]);
if(preg_match('/.*_Diffs_.*|.*_Forward_CompDB_.*|\.cbsu\.cab$/i', $name)) continue;
preg_match('/Digest=".*?"/', $val, $sha1); preg_match('/Digest=".*?"/', $val, $sha1);
$sha1 = preg_replace('/Digest="|"$/', '', $sha1[0]); $sha1 = preg_replace('/Digest="|"$/', '', $sha1[0]);
$sha1 = bin2hex(base64_decode($sha1)); $sha1 = bin2hex(base64_decode($sha1));
preg_match('/FileName=".*?"/', $val, $name);
$name = preg_replace('/FileName="|"$/', '', $name[0]);
preg_match('/Size=".*?"/', $val, $size); preg_match('/Size=".*?"/', $val, $size);
$size = preg_replace('/Size="|"$/', '', $size[0]); $size = preg_replace('/Size="|"$/', '', $size[0]);