mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
win_slurp - fix glob like paths (#53831)
This commit is contained in:
@@ -11,14 +11,14 @@ $result = @{
|
||||
changed = $false;
|
||||
}
|
||||
|
||||
If (Test-Path -Path $src -PathType Leaf)
|
||||
If (Test-Path -LiteralPath $src -PathType Leaf)
|
||||
{
|
||||
$bytes = [System.IO.File]::ReadAllBytes($src);
|
||||
$result.content = [System.Convert]::ToBase64String($bytes);
|
||||
$result.encoding = "base64";
|
||||
Exit-Json $result;
|
||||
}
|
||||
ElseIf (Test-Path -Path $src -PathType Container)
|
||||
ElseIf (Test-Path -LiteralPath $src -PathType Container)
|
||||
{
|
||||
Fail-Json $result "Path $src is a directory";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user