Merge pull request #673 from KnifMelti/GitHub_Fix
Aways download if LastWriteTime not therepull/675/head
commit
123a661142
|
@ -185,8 +185,14 @@ if (Test-Network) {
|
||||||
$Script:ReachNoPath = $False
|
$Script:ReachNoPath = $False
|
||||||
}
|
}
|
||||||
if ($NewList) {
|
if ($NewList) {
|
||||||
|
if ($AlwaysDownloaded) {
|
||||||
|
Write-ToLog "List downloaded/copied to local path: $($WAUConfig.InstallLocation.TrimEnd(" ", "\"))" "Yellow"
|
||||||
|
}
|
||||||
|
else {
|
||||||
Write-ToLog "Newer List downloaded/copied to local path: $($WAUConfig.InstallLocation.TrimEnd(" ", "\"))" "Yellow"
|
Write-ToLog "Newer List downloaded/copied to local path: $($WAUConfig.InstallLocation.TrimEnd(" ", "\"))" "Yellow"
|
||||||
}
|
}
|
||||||
|
$Script:AlwaysDownloaded = $False
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if ($WAUConfig.WAU_UseWhiteList -and (Test-Path "$WorkingDir\included_apps.txt")) {
|
if ($WAUConfig.WAU_UseWhiteList -and (Test-Path "$WorkingDir\included_apps.txt")) {
|
||||||
Write-ToLog "List (white) is up to date." "Green"
|
Write-ToLog "List (white) is up to date." "Green"
|
||||||
|
|
|
@ -54,16 +54,10 @@ function Test-ListPath ($ListPath, $UseWhiteList, $WingetUpdatePath) {
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
try {
|
try {
|
||||||
$content = $wc.DownloadString("$ExternalList")
|
|
||||||
if ($null -ne $content -and $content -match "\w\.\w") {
|
|
||||||
$wc.DownloadFile($ExternalList, $LocalList)
|
$wc.DownloadFile($ExternalList, $LocalList)
|
||||||
|
$Script:AlwaysDownloaded = $True
|
||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$Script:ReachNoPath = $True
|
|
||||||
return $False
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch {
|
catch {
|
||||||
$Script:ReachNoPath = $True
|
$Script:ReachNoPath = $True
|
||||||
return $False
|
return $False
|
||||||
|
@ -93,7 +87,7 @@ function Test-ListPath ($ListPath, $UseWhiteList, $WingetUpdatePath) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$Script:ReachNoPath = $True
|
$Script:ReachNoPath = $True
|
||||||
}
|
|
||||||
return $False
|
return $False
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue