Support large folder size comparisons for win_find (#58466) (#73382)

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

(cherry picked from commit 8def67939d)

Co-authored-by: joshinryz <josh.robinett@gmail.com>
pull/73513/head
Jordan Borean 5 years ago committed by GitHub
parent 6f4ea2f19e
commit 8e5aab4d76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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