fix: win_get_url - fixes for strict-mode

This commit is contained in:
Dreamcat4 2016-04-20 20:26:44 +01:00 committed by Matt Clay
parent c85a82ad00
commit eeabebdd6c

View file

@ -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