win_find - Fix deduped files mistaken for directories (#58680)

* win_find - Fix deduped files mistaken for directories

* Update win_find.ps1

* Update win_find.py

* Update win_find.ps1
pull/62335/head
Shachaf92 5 years ago committed by ansibot
parent 8def67939d
commit 99796dfa87

@ -0,0 +1,2 @@
bugfixes:
- "win_find - Fix deduped files mistaken for directories (https://github.com/ansible/ansible/issues/58511)"

@ -238,13 +238,12 @@ Function Get-FileStat($file) {
} }
$islnk = $false $islnk = $false
$isdir = $false $isdir = $attributes -contains 'Directory'
$isshared = $false $isshared = $false
if ($attributes -contains 'ReparsePoint') { if ($attributes -contains 'ReparsePoint') {
# TODO: Find a way to differenciate between soft and junction links # TODO: Find a way to differenciate between soft and junction links
$islnk = $true $islnk = $true
$isdir = $true
# Try and get the symlink source, can result in failure if link is broken # Try and get the symlink source, can result in failure if link is broken
try { try {

@ -262,7 +262,7 @@ files:
sample: true sample: true
islnk: islnk:
description: If the path is a symbolic link or junction or not. description: If the path is a symbolic link or junction or not.
returned: success, path exists returned: success, path exists or deduped files
type: bool type: bool
sample: true sample: true
isreadonly: isreadonly:

Loading…
Cancel
Save