Merge pull request #10 from abbodi1406/patch-1

Update fetchupd.php
This commit is contained in:
luzea 2021-01-29 20:23:12 +01:00 committed by GitHub
commit 3579ce7afb
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]);