Enhance sha256 capability check
Upgrade to Windows 11 builds include extra EULA files which do not have sha256 value
This commit is contained in:
parent
337a58cd39
commit
99533a04a8
@ -37,11 +37,6 @@ function generatePack($updateId) {
|
||||
$isku = $files['sku'];
|
||||
$files = $files['files'];
|
||||
|
||||
if(!$files[key($files)]['sha256']) {
|
||||
consoleLogger('Update is not SHA-256 capable!');
|
||||
return 0;
|
||||
}
|
||||
|
||||
$filesKeys = array_keys($files);
|
||||
|
||||
$filesToRead = array();
|
||||
@ -50,6 +45,12 @@ function generatePack($updateId) {
|
||||
if(!empty($aggregatedMetadata)) {
|
||||
sort($aggregatedMetadata);
|
||||
$checkFile = $aggregatedMetadata[0];
|
||||
|
||||
if(!$files[$checkFile]['sha256']) {
|
||||
consoleLogger('Update is not SHA-256 capable!');
|
||||
return 0;
|
||||
}
|
||||
|
||||
$url = $files[$checkFile]['url'];
|
||||
$loc = "$tmp/$checkFile";
|
||||
|
||||
@ -105,6 +106,11 @@ function generatePack($updateId) {
|
||||
$dataFiles = preg_grep('/DesktopTargetCompDB_.*_.*\.|ServerTargetCompDB_.*_.*\.|ModernPCTargetCompDB\.|HolographicTargetCompDB\./i', $filesKeys);
|
||||
|
||||
foreach($dataFiles as $val) {
|
||||
if(!$files[$val]['sha256']) {
|
||||
consoleLogger('Update is not SHA-256 capable!');
|
||||
return 0;
|
||||
}
|
||||
|
||||
$url = $files[$val]['url'];
|
||||
$loc = "$tmp/$val";
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
require_once dirname(__FILE__).'/../api/shared/main.php';
|
||||
|
||||
function brand($script = null) {
|
||||
$projVersion = '1.1.0';
|
||||
$projVersion = '1.1.1';
|
||||
return 'UUP dump standalone v'.$projVersion;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user