Skip to content

Fix recursive files download to use full path as prefix#251

Merged
RyanRatcliff merged 1 commit intomasterfrom
chore-fix-recursion
Mar 10, 2026
Merged

Fix recursive files download to use full path as prefix#251
RyanRatcliff merged 1 commit intomasterfrom
chore-fix-recursion

Conversation

@RyanRatcliff
Copy link
Copy Markdown
Contributor

Summary

lo files download <projectId>/path/to/folder/ . --recursive was only using the first path segment as the prefix when listing files, so it downloaded from a higher directory than intended.

Change

  • Parse the source into path segments and use the full path after the project ID as the name (prefix) query param when calling the files list API.
  • Example: projectId/genomic-archive/snp-array-vcf-Build38/ now correctly filters to genomic-archive/snp-array-vcf-Build38 instead of just genomic-archive.

Testing

  • Added a unit test that asserts the list API is called with the full prefix for a multi-segment path.
  • yarn test passes.
  • Verified locally with a recursive download from genomic-archive/snp-array-vcf-Build38/.

Made with Cursor

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 10, 2026

PR Summary

Low Risk
Small CLI parsing change plus a targeted unit test; main impact is altering which files are selected for recursive downloads when the source contains multiple path segments.

Overview
Fixes files download --recursive to treat everything after the project/dataset ID as the prefix, instead of only the first path segment, so recursive downloads list and fetch only the intended subdirectory.

Adds a unit test covering multi-segment prefixes (including trailing slashes) to assert the /v1/files list call includes the full name filter.

Written by Cursor Bugbot for commit 5518f9e. This will update automatically on new commits. Configure here.

@RyanRatcliff RyanRatcliff force-pushed the chore-fix-recursion branch 2 times, most recently from a1b5013 to 8ada6a6 Compare March 10, 2026 14:46
@RyanRatcliff RyanRatcliff merged commit 285ebd2 into master Mar 10, 2026
5 checks passed
@RyanRatcliff RyanRatcliff deleted the chore-fix-recursion branch March 10, 2026 16:42
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 13.15.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants