1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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