fixing ls logic that doesn't grab expected files
This commit is contained in:
parent
57a7091de2
commit
b876b7f83e
@ -28,7 +28,7 @@ class ArchiveParser:
|
|||||||
try:
|
try:
|
||||||
# Use ls with tail and head commands for efficient pagination
|
# Use ls with tail and head commands for efficient pagination
|
||||||
# Get all directories, skip the first start_index, then get count number of entries
|
# 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)
|
print("Running cmd: " + cmd)
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
cmd, shell=True, capture_output=True, text=True, check=True, timeout=30
|
cmd, shell=True, capture_output=True, text=True, check=True, timeout=30
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user