fixing ls logic that doesn't grab expected files

This commit is contained in:
Jarian Cottingham 2025-10-14 18:24:32 -05:00
parent 57a7091de2
commit b876b7f83e

View File

@ -28,7 +28,7 @@ class ArchiveParser:
try:
# Use ls with tail and head commands for efficient pagination
# Get all directories, skip the first start_index, then get count number of entries
cmd = f"ls -1 {self.archive_dir} | tail -n +{start_index + 1} | head -n {count}"
cmd = f"ls -1 {self.archive_dir} | tail -{start_index + 1} | head -{count}"
print("Running cmd: " + cmd)
result = subprocess.run(
cmd, shell=True, capture_output=True, text=True, check=True, timeout=30