Skip to content

Support recursive shared-link subfolder downloads - #403

Merged
AndreyVMarkelov merged 1 commit into
dropbox:masterfrom
AndreyVMarkelov:andreymarkelov/share-link-download-subfolder
Nov 12, 2026
Merged

AndreyVMarkelov merged 1 commit into
dropbox:masterfrom
AndreyVMarkelov:andreymarkelov/share-link-download-subfolder

Conversation

@AndreyVMarkelov

Copy link
Copy Markdown
Contributor

Allow share-link download --path /2027/Logoset --recursive to download just the selected folder. Previously this flag combination was rejected. Downloads now resolve the selected item's metadata, keep API paths relative to the original shared-link root, and write local paths relative to the selected folder. An existing destination receives a Logoset subdirectory; a new destination is used directly.

Reuses the existing traversal, pagination, password handling, retries, and temporary-file downloads. Selected files work with or without --recursive; folder and recursive stdout restrictions remain enforced. Path validation rejects traversal before normalization, errors retain their causes and JSON v1-compatible details, and failures emit no successful partial JSON. Updates command/help examples, generated documentation, and regression tests without changing JSON v1 schemas.

Validation:

  • go fmt ./..., go vet ./..., go test ./..., go test -race ./cmd/..., and go build ./... passed.
  • Configured golangci-lint checks passed with a binary compatible with the local Go 1.27.4 toolchain. Documentation/schema generation and the skill contract checks passed.
  • Windows/amd64 command tests cross-compiled successfully.
  • Live Dropbox E2E: 31 check groups passed, with 29 byte-for-byte file comparisons. All 17 captured success responses and 15 error responses validated against JSON v1 schemas.
  • Live coverage included selected/root recursive downloads, existing/new/omitted destinations, nested and empty folders, Unicode/binary contents, file modes, stdout, paths returned by share-link ls, password/file/prompt inputs, incorrect passwords, invalid inputs, cancellation, revoked links, and controlled partial local failures. Disposable shared links were revoked and remote fixtures deleted.

Live pagination, separate-account/unmounted access, and Windows execution were not exercised; pagination/unmounted behavior has mock coverage and Windows checks were cross-compiled. The authenticated owner can access its password-protected link without a password, so missing-password rejection was not verified live. Network interruption/retry failures use deterministic regression tests.

Closes #394.

@AndreyVMarkelov
AndreyVMarkelov merged commit f822763 into dropbox:master Nov 12, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow --path with --recursive on share-link download to download a subfolder

1 participant