Fix date and time check in loop

pull/232/head
KnifMelti 2022-11-08 01:09:52 +01:00
parent bcb274b178
commit fdfcdc9858
1 changed files with 2 additions and 0 deletions

View File

@ -38,6 +38,8 @@ function Test-ModsPath ($ModsPath, $WingetUpdatePath) {
#Check for .ps1 in listing/HREF:s in an index page pointing to .ps1
if ($_ -like "*.ps1") {
try {
$dateExternalMod = ""
$dateLocalMod =""
$wc.OpenRead("$ExternalMods/$_").Close() | Out-Null
$dateExternalMod = ([DateTime]$wc.ResponseHeaders['Last-Modified']).ToString("yyyy-MM-dd HH:mm:ss")
if (Test-Path -Path $LocalMods"\"$_) {