mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
Fix for ansible modules core 2147
This commit is contained in:
parent
1fc2c8c324
commit
183430628b
1 changed files with 2 additions and 5 deletions
|
@ -71,18 +71,15 @@ If (Test-Path $path)
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
# Only files have the .Directory attribute.
|
If ( $state -eq "directory" -and -not $fileinfo.PsIsContainer )
|
||||||
If ( $state -eq "directory" -and $fileinfo.Directory )
|
|
||||||
{
|
{
|
||||||
Fail-Json (New-Object psobject) "path is not a directory"
|
Fail-Json (New-Object psobject) "path is not a directory"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only files have the .Directory attribute.
|
If ( $state -eq "file" -and $fileinfo.PsIsContainer )
|
||||||
If ( $state -eq "file" -and -not $fileinfo.Directory )
|
|
||||||
{
|
{
|
||||||
Fail-Json (New-Object psobject) "path is not a file"
|
Fail-Json (New-Object psobject) "path is not a file"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue