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
pull/62335/head
joshinryz 5 years ago committed by ansibot
parent d361ff4122
commit 8def67939d

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

@ -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 {

Loading…
Cancel
Save