diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 950d94356..8fa720335 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,6 +118,11 @@ jobs: env: ARIA2_E2E_BIN: ${{ github.workspace }}/src/aria2c run: node --test test/e2e/select-dns.e2e.test.mjs + - name: Verify nested cloud-drive output paths + if: matrix.bittorrent == 'with-bt' + env: + ARIA2_E2E_BIN: ${{ github.workspace }}/src/aria2c + run: node --test test/e2e/nested-output.e2e.test.mjs - name: Verify legacy recovery and schema upgrade snapshots if: matrix.bittorrent == 'with-bt' env: @@ -228,6 +233,10 @@ jobs: env: ARIA2_E2E_BIN: ${{ github.workspace }}\bin\aria2c.exe run: node --test test/e2e/select-dns.e2e.test.mjs + - name: Verify nested cloud-drive output paths + env: + ARIA2_E2E_BIN: ${{ github.workspace }}\bin\aria2c.exe + run: node --test test/e2e/nested-output.e2e.test.mjs - name: Verify native HTTP redirect policy env: ARIA2_E2E_BIN: ${{ github.workspace }}\bin\aria2c.exe diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5fb992557..479e49869 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: inputs: version: description: 'Version for a dry run (no leading v)' - default: '1.37.0-motrix.22-dev' + default: '1.37.0-motrix.23-dev' permissions: contents: write @@ -412,6 +412,8 @@ jobs: fi - name: Verify task cookies and credential redirects run: node --test --test-concurrency=1 test/e2e/task-cookies.e2e.test.mjs test/e2e/http-retry.e2e.test.mjs + - name: Verify nested cloud-drive output paths + run: node --test test/e2e/nested-output.e2e.test.mjs legacy-checkpoint-contract: needs: [macos, windows, linux] @@ -578,6 +580,8 @@ jobs: 'aria2 fork build for Motrix. Base: upstream 1.37.0.' \ '' \ 'Highlights:' \ + '- Restore HTTP/FTP output paths relative to the download directory, including leading-slash paths sent by cloud-drive RPC clients (agalwood/Motrix#2502).' \ + '- Verify nested Unicode directories, changed output options and SQLite restart recovery while preserving absolute BitTorrent file mappings.' \ '- Retain failed unfinished HTTP task cookies, including explicitly empty cookie contexts, across engine restarts.' \ '- Resume an opted-in HTTP task with its original GID, checkpoint, request options and task-scoped cookies through versioned RPCs.' \ '- Verify the original source, output path and persisted resource validators before reusing partial data; refuse unverifiable or changed resources.' \ @@ -594,6 +598,7 @@ jobs: '- Retain task-scoped cookies, cross-origin credential isolation and long-path support.' \ '' \ 'Compatibility:' \ + '- HTTP/FTP --out is relative to --dir, matching upstream aria2. Use --dir to select an absolute destination; absolute BitTorrent --index-out mappings remain supported.' \ '- Schema 6 cannot be opened by older engines. Downgrades require the pre-upgrade backup; do not delete or reset the upgraded database.' \ '- Native HTTP retry requires enabled SQLite persistence, a supporting client, and historical context captured for an opted-in task. Previously deleted cookies or missing historical validators cannot be reconstructed.' \ '- BT activation verifies pieces and may write shared-piece bytes in an unselected adjacent file; zero upload is not guaranteed.' \ diff --git a/src/RpcMethodImpl.cc b/src/RpcMethodImpl.cc index 72e481eaa..8bf1d5504 100644 --- a/src/RpcMethodImpl.cc +++ b/src/RpcMethodImpl.cc @@ -2383,7 +2383,8 @@ void changeOption(const std::shared_ptr& group, if (!grOption->blank(PREF_OUT)) { fileEntry->setPath( - util::applyDir(grOption->get(PREF_DIR), grOption->get(PREF_OUT))); + util::applyDir(grOption->get(PREF_DIR), grOption->get(PREF_OUT), + false)); fileEntry->setSuffixPath(A2STR::NIL); } else if (fileEntry->getSuffixPath().empty()) { diff --git a/src/download_helper.cc b/src/download_helper.cc index 79f757eca..1c4706a84 100644 --- a/src/download_helper.cc +++ b/src/download_helper.cc @@ -139,7 +139,7 @@ createRequestGroup(const std::shared_ptr