Support large folder size comparisons for win_find (#58466)

* Support large folder size comparisons for win_find

Changed [int] to [int64] to support larger folders. Otherwise module fails as soon as a large folder is encountered.

* Create 58466-FIX_win_find-Bug-Get-FileStat_fails_on_large_files.yml
This commit is contained in:
joshinryz 2019-09-15 18:04:59 -05:00 committed by ansibot
parent d361ff4122
commit 8def67939d
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "win_find - Get-FileStat used [int] instead of [int64] for file size calculations"

View file

@ -177,7 +177,7 @@ Function Assert-Size($info) {
$size_pattern = '^(-?\d+)(b|k|m|g|t)?$'
$match = $size -match $size_pattern
if ($match) {
[int]$specified_size = $matches[1]
[int64]$specified_size = $matches[1]
if ($null -eq $matches[2]) {
$chosen_byte = 'b'
} else {