[release/v7.4.2] Fix regression -Tail 0 -Wait (#20734) (#21418)

This commit is contained in:
Patrick Meinecke
2024-04-04 15:24:35 -07:00
committed by GitHub
parent 6b10aa21b8
commit c16cfe8f87
2 changed files with 12 additions and 2 deletions
@@ -87,7 +87,7 @@ namespace Microsoft.PowerShell.Commands
return;
}
if (TotalCount == 0 || Tail == 0)
if (TotalCount == 0)
{
// Don't read anything
return;
@@ -118,7 +118,7 @@ namespace Microsoft.PowerShell.Commands
// as reading forwards. So we read forwards in this case.
// If Tail is positive, we seek the right position. Or, if the seek failed
// because of an unsupported encoding, we scan forward to get the tail content.
if (Tail > 0)
if (Tail >= 0)
{
bool seekSuccess = false;