From b3584c5ffebf8c697dab540b88d1515f6897c221 Mon Sep 17 00:00:00 2001 From: Dreamcat4 Date: Wed, 20 Apr 2016 20:26:44 +0100 Subject: [PATCH] fix: win_get_url - fixes for strict-mode --- windows/win_get_url.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/win_get_url.ps1 b/windows/win_get_url.ps1 index 75bef615ab7..1f0e6580ddc 100644 --- a/windows/win_get_url.ps1 +++ b/windows/win_get_url.ps1 @@ -105,7 +105,7 @@ Else { Fail-Json $result "Error when requesting Last-Modified date from $url $($_.Exception.Message)" } - If ((Get-Date -Date $webLastMod ) -lt $fileLastMod) { + If (($webLastMod) -and ((Get-Date -Date $webLastMod ) -lt $fileLastMod)) { $result.changed = $false } Else { Download-File -result $result -url $url -dest $dest -username $username -password $password -proxy_url $proxy_url -proxy_username $proxy_username -proxy_password $proxy_password