From 96c2d921065c404f966874345568885dbe0f8dc1 Mon Sep 17 00:00:00 2001 From: mwnickerson Date: Mon, 9 Feb 2026 23:53:26 -0500 Subject: [PATCH] Changed the file sorting logic for the resume function to take into account numbers larger than 1000 --- githound.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/githound.ps1 b/githound.ps1 index 378a230..15ab53e 100644 --- a/githound.ps1 +++ b/githound.ps1 @@ -1893,7 +1893,7 @@ function Git-HoundRepositoryRole # Auto-detect resume from existing chunk files if ($currentIndex -eq 0) { - $existingChunks = @(Get-ChildItem -Path $CheckpointPath -Filter "githound_RepoRole_chunk_*.json" -ErrorAction SilentlyContinue | Sort-Object Name) + $existingChunks = @(Get-ChildItem -Path $CheckpointPath -Filter "githound_RepoRole_chunk_*.json" -ErrorAction SilentlyContinue | Sort-Object { [int]($_.BaseName -replace 'githound_RepoRole_chunk_', '') }) if ($existingChunks.Count -gt 0) { foreach ($chunk in $existingChunks) { try { @@ -2599,7 +2599,7 @@ function Git-HoundWorkflow # Auto-detect resume from existing chunk files if ($currentIndex -eq 0) { - $existingChunks = @(Get-ChildItem -Path $CheckpointPath -Filter "githound_Workflow_chunk_*.json" -ErrorAction SilentlyContinue | Sort-Object Name) + $existingChunks = @(Get-ChildItem -Path $CheckpointPath -Filter "githound_Workflow_chunk_*.json" -ErrorAction SilentlyContinue | Sort-Object { [int]($_.BaseName -replace 'githound_Workflow_chunk_', '') }) if ($existingChunks.Count -gt 0) { foreach ($chunk in $existingChunks) { try { @@ -3118,7 +3118,7 @@ function Git-HoundSecret # Auto-detect resume from existing chunk files if ($currentIndex -eq 0) { - $existingChunks = @(Get-ChildItem -Path $CheckpointPath -Filter "githound_Secret_chunk_*.json" -ErrorAction SilentlyContinue | Sort-Object Name) + $existingChunks = @(Get-ChildItem -Path $CheckpointPath -Filter "githound_Secret_chunk_*.json" -ErrorAction SilentlyContinue | Sort-Object { [int]($_.BaseName -replace 'githound_Secret_chunk_', '') }) if ($existingChunks.Count -gt 0) { foreach ($chunk in $existingChunks) { try {