A full-featured download manager.
fix(engine): open windows paths past MAX_PATH (#2195)
Dr_rOota7cf99b8d5d4
diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.ymlindex acdb54ce..36f31edc 100644--- a/.github/workflows/flatpak.yml+++ b/.github/workflows/flatpak.yml@@ -341,7 +341,7 @@ jobs:-path "*/native-messaging-hosts/*" \\) -print -quit)"output="$("$aria2c" --version)"- printf "%s\n" "$output" | grep -qF "aria2 version 1.37.0-motrix.15"+ printf "%s\n" "$output" | grep -qF "aria2 version 1.37.0-motrix.16"printf "%s\n" "$output" | grep -qF "Async DNS"printf "%s\n" "$output" | grep -qF "BitTorrent"printf "%s\n" "$output" | grep -qF "HTTPS"diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.mdindex 2d404c19..494d2e54 100644--- a/THIRD_PARTY_NOTICES.md+++ b/THIRD_PARTY_NOTICES.md@@ -100,8 +100,8 @@ must obtain permission or replace the font before distributing the build.Desktop builds bundle an `aria2c` executable pinned by`scripts/engine.lock.json`:-- **Version:** 1.37.0-motrix.15-- **Source:** <https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.15>+- **Version:** 1.37.0-motrix.16+- **Source:** <https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.16>- **License:** GNU General Public License v2.0 or later (`GPL-2.0-or-later`)- **Full license text:** `THIRD_PARTY_LICENSES/aria2-COPYING`- **OpenSSL exception / notice:**diff --git a/THIRD_PARTY_NOTICES.zh-CN.md b/THIRD_PARTY_NOTICES.zh-CN.mdindex 1184843e..542d8527 100644--- a/THIRD_PARTY_NOTICES.zh-CN.md+++ b/THIRD_PARTY_NOTICES.zh-CN.md@@ -88,8 +88,8 @@ src/renderer/routes/settings/icons/[email protected]桌面版随应用打包 `aria2c` 可执行文件,版本由 `scripts/engine.lock.json` 固定:-- **版本:** 1.37.0-motrix.15-- **对应源码:** <https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.15>+- **版本:** 1.37.0-motrix.16+- **对应源码:** <https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.16>- **许可证:** GNU General Public License v2.0 or later(`GPL-2.0-or-later`)- **完整许可证文本:** `THIRD_PARTY_LICENSES/aria2-COPYING`- **OpenSSL 例外条款 / 声明:**diff --git a/flatpak/app.motrix.native.yml b/flatpak/app.motrix.native.ymlindex 3b98a7d2..00c100d2 100644--- a/flatpak/app.motrix.native.yml+++ b/flatpak/app.motrix.native.yml@@ -101,7 +101,7 @@ modules:set -eoutput="$(src/aria2c --version)"printf '%s\n' "$output"- printf '%s\n' "$output" | grep -qF 'aria2 version 1.37.0-motrix.15'+ printf '%s\n' "$output" | grep -qF 'aria2 version 1.37.0-motrix.16'for feature in \'Async DNS' \'BitTorrent' \@@ -123,8 +123,8 @@ modules:sources:- type: giturl: https://github.com/motrixapp/aria2.git- tag: v1.37.0-motrix.15- commit: 8a54d2c76373f7e33607148e67e3ba3770748749+ tag: v1.37.0-motrix.16+ commit: e093973f113f0a880f9757a2ad0258cb2356295ex-checker-data:type: gittag-pattern: ^v([\d.]+-motrix\.\d+)$@@ -136,9 +136,9 @@ modules:commands:- |sed -i -E \- 's/AC_INIT\(\[aria2\],\[[^]]+\]/AC_INIT([aria2],[1.37.0-motrix.15]/' \+ 's/AC_INIT\(\[aria2\],\[[^]]+\]/AC_INIT([aria2],[1.37.0-motrix.16]/' \configure.ac- grep -qF 'AC_INIT([aria2],[1.37.0-motrix.15]' configure.ac+ grep -qF 'AC_INIT([aria2],[1.37.0-motrix.16]' configure.ac- type: scriptdest-filename: autogen.shcommands:diff --git a/scripts/engine.lock.json b/scripts/engine.lock.jsonindex abf8398d..541a0cb2 100644--- a/scripts/engine.lock.json+++ b/scripts/engine.lock.json@@ -1,50 +1,50 @@{"engine": "aria2","repo": "motrixapp/aria2",- "tag": "v1.37.0-motrix.15",- "version": "1.37.0-motrix.15",+ "tag": "v1.37.0-motrix.16",+ "version": "1.37.0-motrix.16","assets": {"darwin-arm64": {- "file": "aria2c-1.37.0-motrix.15-darwin-arm64.tar.gz",+ "file": "aria2c-1.37.0-motrix.16-darwin-arm64.tar.gz","bin": "aria2c",- "archiveSha256": "71529c8e4a9b1e92e9d720230e05313333d3c90bb0dd50ee1ddbd8fc92dfe787",- "binarySha256": "7bdf7e0d261744356f995cf3e642bc71da18eebcdf57c8b1b5f2519ca3b7264d"+ "archiveSha256": "bb9e8abf19423e593b4d5962d98ea4a798f94fd2a8431ba214bae5838382dc68",+ "binarySha256": "4990d1d119e2c3b42e89b5ca0e7fa062cad00037ea6d7341a6c756da57f0c053"},"darwin-x64": {- "file": "aria2c-1.37.0-motrix.15-darwin-x64.tar.gz",+ "file": "aria2c-1.37.0-motrix.16-darwin-x64.tar.gz","bin": "aria2c",- "archiveSha256": "15cbedc4ac739ff0678166a3926d8cb6fd40a178e49a6eb2db04a44f585fbf25",- "binarySha256": "22c26d5afdc7522158ade68207826a918c1ed55a79bfa23dfd8da5de87663c2f"+ "archiveSha256": "c578852e975f94e8d2e163e696a4dfc81dec4457618219c09853d20d233900e0",+ "binarySha256": "baffd6543f715494a7ae871e3e2f7ec95792fdeb13f98db7924dcaed874d0cda"},"win32-x64": {- "file": "aria2c-1.37.0-motrix.15-win32-x64.zip",+ "file": "aria2c-1.37.0-motrix.16-win32-x64.zip","bin": "aria2c.exe",- "archiveSha256": "e056fa31ce308b08b5071e3633cb81bba0fa6d5cae00186142f185ee41823ccb",- "binarySha256": "5c565413d5b637aef7d0e427b1e048e29dd94657e66c7333c21dd8f47a03ba73"+ "archiveSha256": "579f17351e81c9fe3ed11d9700f5983235fc362beaf20f5f02820f7a1bfe49b0",+ "binarySha256": "b7edee5c43ff18b9e8b77983033ba7816fa220d810949d81fdb928e8b36d862f"},"win32-ia32": {- "file": "aria2c-1.37.0-motrix.15-win32-ia32.zip",+ "file": "aria2c-1.37.0-motrix.16-win32-ia32.zip","bin": "aria2c.exe",- "archiveSha256": "d1021de0120a81c1b484c7dc34e1e2672a83a0497656bbd880b101f16761635e",- "binarySha256": "c8e1478579421bc573c0cbb23f79d58be5ba5e15f37c930973595ff8493b190c"+ "archiveSha256": "5fe63ed9f6b5b5271ac719a089a6663171f68466b046e38fa9b393af9d28210b",+ "binarySha256": "878c59532df2fa1e5dff04dcde3c70b570396734cf3fd662f16ecd0b77ba8535"},"linux-x64": {- "file": "aria2c-1.37.0-motrix.15-linux-x64.tar.gz",+ "file": "aria2c-1.37.0-motrix.16-linux-x64.tar.gz","bin": "aria2c",- "archiveSha256": "8a4ea58485404d967a8e2fa30b58714b3e9200850833031f5a5afa0d32aa95c6",- "binarySha256": "acd157ead3aef6d3e4bdd30fc4cbbc09cc00bcc27cd97682d797fb7d56de1ca4"+ "archiveSha256": "bd48c06cbf6bebc32e1b75c2abbdad5c0787800b16266147bd0bf5904ce16e94",+ "binarySha256": "69980468779003e058c98ad257330caf5dff6338cb1b714f8a7cd76b9bc4e693"},"linux-arm64": {- "file": "aria2c-1.37.0-motrix.15-linux-arm64.tar.gz",+ "file": "aria2c-1.37.0-motrix.16-linux-arm64.tar.gz","bin": "aria2c",- "archiveSha256": "1456b70189009a0853e1b3606611619ef2fb446134537ca0b7708935218d8e03",- "binarySha256": "30c9fe4e9afdf21a625f5bb305246898599336028c0d965e75f36400b842005a"+ "archiveSha256": "65511295a68fd3bcb002022c2a09364f46a8da6eb385d6c2c3915c5ea349692f",+ "binarySha256": "0edfe1408394c88b5b8c91df9cbcd72886085b7373379c61d75dfdc32dc5cfc3"},"linux-arm": {- "file": "aria2c-1.37.0-motrix.15-linux-armv7l.tar.gz",+ "file": "aria2c-1.37.0-motrix.16-linux-armv7l.tar.gz","bin": "aria2c",- "archiveSha256": "46ca68ab35be9a19169125a1aae01562f0c990e8de90e0a240f70a7a31647a66",- "binarySha256": "1b20ca8abcbe4e55554794d2b88d3e034cc54595189ee3a06291fb12e877ab1b"+ "archiveSha256": "d25727100c5f7d197079a9ad73f4698614286b9d4cc10de4c26ab8d04f9768de",+ "binarySha256": "1db7f580677f6d8beb9ddda7f153853c9606c0abb1babc5471867c82a9c1c357"}}}diff --git a/scripts/verify-flatpak-packaging.mjs b/scripts/verify-flatpak-packaging.mjsindex 70fab12a..22d3faf5 100644--- a/scripts/verify-flatpak-packaging.mjs+++ b/scripts/verify-flatpak-packaging.mjs@@ -18,8 +18,8 @@ export const FLATPAK_BUILDER_TOOLS_COMMIT =// tag resolves to is pinned by hand (and cross-checked against the manifest).export const ARIA2_SOURCE = Object.freeze({url: 'https://github.com/motrixapp/aria2.git',- // v1.37.0-motrix.15 — current Motrix aria2 fork release- commit: '8a54d2c76373f7e33607148e67e3ba3770748749',+ // v1.37.0-motrix.16 — current Motrix aria2 fork release+ commit: 'e093973f113f0a880f9757a2ad0258cb2356295e',})const PNPM_SOURCE = Object.freeze({diff --git a/src/core/engine/aria2/translate.test.ts b/src/core/engine/aria2/translate.test.tsindex cfd49740..1c33df08 100644--- a/src/core/engine/aria2/translate.test.ts+++ b/src/core/engine/aria2/translate.test.ts@@ -1,3 +1,4 @@+import { WINDOWS_MAX_PATH } from '@core/task/path-length'import { DownloadErrorCode } from '@shared/errors'import { TaskStatus, TaskType, TransitionPhase } from '@shared/types/task'import { describe, expect, it } from 'vitest'@@ -368,22 +369,41 @@ describe('translatePeer', () => {})describe('classifyTerminalError', () => {- const OVER_LIMIT = String.raw`F:\Game\Dead Cells (2018).motrix\Dead Cells (2018)\Bonuses\Dead Cells - Demake Soundtrack\FLAC Yoann Laulan - Dead Cells - Soundtrack Part 2 (Demake) FLAC\Yoann Laulan - Dead Cells - Soundtrack Part 2 (Demake) - 21 The Time Keeper Formerly Known As Assassin.flac`+ // The #2183 destination: 262 characters, which the engine now opens.+ const ISSUE_2183 = String.raw`F:\Game\Dead Cells (2018).motrix\Dead Cells (2018)\Bonuses\Dead Cells - Demake Soundtrack\FLAC Yoann Laulan - Dead Cells - Soundtrack Part 2 (Demake) FLAC\Yoann Laulan - Dead Cells - Soundtrack Part 2 (Demake) - 21 The Time Keeper Formerly Known As Assassin.flac`+ // Past even the extended-length limit.+ const OVER_LIMIT = `F:\\${'a'.repeat(WINDOWS_MAX_PATH)}`- it('re-reads a file-open failure over MAX_PATH as a path-length error', () => {+ it('re-reads a file-open failure past the path limit as a path-length error', () => {expect(classifyTerminalError('16',- `Failed to open the file ${OVER_LIMIT}, cause: The system cannot find the path specified.`,+ `Failed to open the file ${OVER_LIMIT}, cause: The filename or extension is too long.`,'win32')).toEqual({errorCode: DownloadErrorCode.PathTooLong,errorDetailKey: 'task.error.detail.pathTooLong',- errorDetailParams: { length: '262', limit: '259', path: OVER_LIMIT },+ errorDetailParams: {+ length: String(OVER_LIMIT.length),+ limit: String(WINDOWS_MAX_PATH),+ path: OVER_LIMIT,+ },})})+ it('no longer blames the length of a path over MAX_PATH', () => {+ // aria2 opens such paths through the \\?\ namespace, so a failure there+ // is a genuine write error (permissions, locks), not an overrun.+ expect(+ classifyTerminalError(+ '16',+ `Failed to open the file ${ISSUE_2183}, cause: Access is denied.`,+ 'win32'+ ).errorCode+ ).toBe(DownloadErrorCode.FileWriteError)+ })+it('leaves a genuine write failure alone when the path fits', () => {expect(classifyTerminalError(diff --git a/src/core/engine/aria2/translate.ts b/src/core/engine/aria2/translate.tsindex 1c2a0fab..77260f24 100644--- a/src/core/engine/aria2/translate.ts+++ b/src/core/engine/aria2/translate.ts@@ -134,12 +134,13 @@ export interface TerminalErrorClassification {/*** Refine `translateErrorCode` with what the engine's message reveals.*- * aria2 reports an over-long Windows destination as a plain file-open failure- * carrying the OS text "The system cannot find the path specified"- * (ERROR_PATH_NOT_FOUND), which the code-only mapping flattens into+ * aria2 reports a Windows destination past the extended-length path limit as+ * a plain file-open failure, which the code-only mapping flattens into* `FileWriteError` — surfaced to the user as "check folder permissions and* disk space", advice that cannot resolve it. Measuring the path aria2 names- * separates the two causes. See agalwood/Motrix#2183.+ * separates the two causes. Paths merely past MAX_PATH are not flagged: the+ * engine opens those (agalwood/Motrix#2183), so a failure there is a genuine+ * write error.*/export function classifyTerminalError(rawErrorCode: string | null | undefined,diff --git a/src/core/task/create-task-handler.ts b/src/core/task/create-task-handler.tsindex 1b05e3ac..55b55835 100644--- a/src/core/task/create-task-handler.ts+++ b/src/core/task/create-task-handler.ts@@ -540,12 +540,12 @@ async function handleCreateTaskUnderAdmission(: null// Fail before a single byte moves when a destination cannot be opened at- // all. Windows caps a path at MAX_PATH and reports the overrun as- // ERROR_PATH_NOT_FOUND mid-download, so without this the user pays for the- // transfer first and then reads a misleading "cannot find the path" error- // (agalwood/Motrix#2183). A .torrent declares its internal paths up front,- // so the deep nesting that actually overruns is knowable here; a magnet's- // is not, and falls back to the terminal-error classifier.+ // all. The engine opens Windows paths past MAX_PATH (agalwood/Motrix#2183),+ // but not past the extended-length limit (see path-length); without this+ // the user would pay for the transfer before a generic write error. A+ // .torrent declares its internal paths up front, so its deepest one is+ // checkable here; a magnet's is not, and falls back to the terminal-error+ // classifier.const plannedPaths = [diskPath, finalPath]for (const file of parsedBtLayout?.files ?? []) {if (file.pathInsideRoot) {diff --git a/src/core/task/path-length.test.ts b/src/core/task/path-length.test.tsindex 07bb4bd6..fc65a2aa 100644--- a/src/core/task/path-length.test.ts+++ b/src/core/task/path-length.test.ts@@ -10,12 +10,16 @@ import {const ISSUE_2183 = String.raw`F:\Game\Dead Cells (2018).motrix\Dead Cells (2018)\Bonuses\Dead Cells - Demake Soundtrack\FLAC Yoann Laulan - Dead Cells - Soundtrack Part 2 (Demake) FLAC\Yoann Laulan - Dead Cells - Soundtrack Part 2 (Demake) - 21 The Time Keeper Formerly Known As Assassin.flac`describe('exceedsPathLimit', () => {- it('flags the #2183 destination on win32', () => {+ it('accepts the #2183 destination now that the engine opens long paths', () => {+ // 262 characters used to overrun MAX_PATH. aria2 passes such paths+ // through the \\?\ namespace since 1.37.0-motrix.16, so it fits.expect(ISSUE_2183).toHaveLength(262)- expect(exceedsPathLimit(ISSUE_2183, 'win32')).toEqual({- length: 262,- limit: WINDOWS_MAX_PATH,- })+ expect(exceedsPathLimit(ISSUE_2183, 'win32')).toBeNull()+ })++ it('uses the extended-length limit, less the engine prefix', () => {+ // 32,767 UTF-16 units, minus the longest prefix aria2 adds (\\?\UNC\).+ expect(WINDOWS_MAX_PATH).toBe(32_767 - '\\\\?\\UNC\\'.length)})it('accepts a path exactly at the limit', () => {@@ -26,25 +30,30 @@ describe('exceedsPathLimit', () => {it('flags one character past the limit', () => {const overLimit = `C:\\${'a'.repeat(WINDOWS_MAX_PATH - 2)}`- expect(exceedsPathLimit(overLimit, 'win32')?.length).toBe(- WINDOWS_MAX_PATH + 1- )+ expect(exceedsPathLimit(overLimit, 'win32')).toEqual({+ length: WINDOWS_MAX_PATH + 1,+ limit: WINDOWS_MAX_PATH,+ })})- it('never flags on platforms without the MAX_PATH cap', () => {- expect(exceedsPathLimit(ISSUE_2183, 'darwin')).toBeNull()- expect(exceedsPathLimit(ISSUE_2183, 'linux')).toBeNull()+ it('never flags on POSIX platforms', () => {+ const huge = `/d/${'a'.repeat(WINDOWS_MAX_PATH)}`+ expect(exceedsPathLimit(huge, 'darwin')).toBeNull()+ expect(exceedsPathLimit(huge, 'linux')).toBeNull()})it('ignores a path already escaped with the long-path prefix', () => {- expect(exceedsPathLimit(`\\\\?\\${ISSUE_2183}`, 'win32')).toBeNull()+ const huge = `\\\\?\\C:\\${'a'.repeat(WINDOWS_MAX_PATH)}`+ expect(exceedsPathLimit(huge, 'win32')).toBeNull()})it('measures UTF-16 code units, not code points', () => {- // An astral emoji is two UTF-16 units to Windows, so a path that looks- // short by code points can still overrun MAX_PATH.- const emoji = '\u{1F600}'.repeat(130) // 130 code points, 260 units- expect(exceedsPathLimit(`C:\\${emoji}`, 'win32')?.length).toBe(263)+ // An astral character costs Windows two units: this path is under the+ // limit by code points but over it by units.+ const pairs = Math.ceil(WINDOWS_MAX_PATH / 2)+ const emoji = `C:\\${'\u{1F600}'.repeat(pairs)}`+ expect([...emoji].length).toBeLessThan(WINDOWS_MAX_PATH)+ expect(exceedsPathLimit(emoji, 'win32')?.length).toBe(3 + pairs * 2)})})@@ -79,8 +88,8 @@ describe('findPathOverrun', () => {})it('reports the worst offender, not the first', () => {- const slightly = `${dir}\\${'a'.repeat(160)}`- const badly = `${dir}\\${'b'.repeat(400)}`+ const slightly = `${dir}\\${'a'.repeat(WINDOWS_MAX_PATH)}`+ const badly = `${dir}\\${'b'.repeat(WINDOWS_MAX_PATH * 2)}`expect(findPathOverrun([slightly, badly], 'win32')?.path).toBe(badly)})@@ -89,6 +98,8 @@ describe('findPathOverrun', () => {})it('is inert off win32', () => {- expect(findPathOverrun([`${dir}\\${'b'.repeat(400)}`], 'linux')).toBeNull()+ expect(+ findPathOverrun([`${dir}\\${'b'.repeat(WINDOWS_MAX_PATH)}`], 'linux')+ ).toBeNull()})})diff --git a/src/core/task/path-length.ts b/src/core/task/path-length.tsindex e59ce829..0ad703ec 100644--- a/src/core/task/path-length.ts+++ b/src/core/task/path-length.ts@@ -1,17 +1,20 @@-// Windows caps a path at MAX_PATH (260 including the terminating NUL, so 259-// usable characters) unless BOTH the machine's LongPathsEnabled policy is on-// AND the process declares `longPathAware` in its manifest. aria2c.exe carries-// that manifest (aria2_motrix/src/aria2c.manifest), but the policy is off by-// default on most installs, so an over-long destination still fails — and it-// fails with ERROR_PATH_NOT_FOUND, whose text ("The system cannot find the-// path specified") reads as a missing directory rather than an over-long path.+// Windows' legacy MAX_PATH (260) does not bound downloads: since+// 1.37.0-motrix.16 aria2c passes any path of 248+ characters through the \\?\+// namespace (resolved with GetFullPathNameW, following Rust std and Go), so it+// needs neither the LongPathsEnabled policy nor a shorter destination+// (agalwood/Motrix#2183). What remains is the extended-length limit of 32,767+// UTF-16 units, which the prefix itself counts toward. Past it no API can open+// the path, and ERROR_FILENAME_EXCED_RANGE surfaces as a generic write error.//// Motrix already budgets the filename against NAME_MAX (255 bytes, see// direct-resource-validator). That is a different, per-component limit; it-// says nothing about the assembled path. See agalwood/Motrix#2183.+// says nothing about the assembled path.-/** Usable characters in a Windows path without the `\\?\` escape. */-export const WINDOWS_MAX_PATH = 259+/** Longest prefix aria2 adds for the extended-length namespace. */+const ENGINE_LONG_PATH_PREFIX = '\\\\?\\UNC\\'++/** Usable UTF-16 units in a Windows path opened by the engine. */+export const WINDOWS_MAX_PATH = 32_767 - ENGINE_LONG_PATH_PREFIX.length/** Paths already escaped with this prefix bypass the MAX_PATH parser. */const LONG_PATH_PREFIX = '\\\\?\\'@@ -24,8 +27,8 @@ export interface PathLengthOverrun {/*** Report a destination that the platform cannot open, or null when it fits.- * Only win32 has a whole-path cap low enough to hit in practice; POSIX- * PATH_MAX (4096) is out of reach for any name a download produces.+ * Only win32 carries a whole-path cap worth checking here; POSIX PATH_MAX+ * (4096) is out of reach for any name a download produces.*/export function exceedsPathLimit(filePath: string,diff --git a/src/shared/locales/en-US.json b/src/shared/locales/en-US.jsonindex 6ea3d9e3..11a72521 100644--- a/src/shared/locales/en-US.json+++ b/src/shared/locales/en-US.json@@ -1140,7 +1140,7 @@"networkError": "Check your network connection, then retry","timeout": "Check your connection speed and stability, then retry","fileWriteError": "Check folder permissions and available disk space, then retry",- "pathTooLong": "Shorten the save folder or the file name, or enable Windows long path support, then retry",+ "pathTooLong": "Shorten the save folder or the file name, then retry","checksumMismatch": "The downloaded file may be corrupted; re-download to verify it","tooManyRedirects": "The source link may be broken; try a different link","btMetadataFailed": "Check the magnet link or add more trackers, then retry"diff --git a/src/shared/locales/zh-CN.json b/src/shared/locales/zh-CN.jsonindex 41fd0afa..68866968 100644--- a/src/shared/locales/zh-CN.json+++ b/src/shared/locales/zh-CN.json@@ -1126,7 +1126,7 @@"networkError": "检查网络连接后重试","timeout": "检查网络连接速度和稳定性后重试","fileWriteError": "检查文件夹权限和磁盘空间后重试",- "pathTooLong": "缩短保存目录或文件名后重试;也可在 Windows 中启用长路径支持",+ "pathTooLong": "缩短保存目录或文件名后重试","checksumMismatch": "下载的文件可能已损坏,请重新下载以校验","tooManyRedirects": "该链接可能已失效,请尝试更换下载链接","btMetadataFailed": "检查磁力链接或添加更多 Tracker 后重试"diff --git a/src/shared/locales/zh-TW.json b/src/shared/locales/zh-TW.jsonindex 6c0db05d..4e38e205 100644--- a/src/shared/locales/zh-TW.json+++ b/src/shared/locales/zh-TW.json@@ -1126,7 +1126,7 @@"networkError": "請檢查網路連線,然後重試","timeout": "請檢查連線速度與穩定性,然後重試","fileWriteError": "請檢查資料夾權限與可用磁碟空間,然後重試",- "pathTooLong": "縮短儲存目錄或檔名後重試;也可在 Windows 中啟用長路徑支援",+ "pathTooLong": "縮短儲存目錄或檔名後重試","checksumMismatch": "下載的檔案可能損毀,請重新下載以驗證","tooManyRedirects": "來源連結可能失效,請嘗試其他連結","btMetadataFailed": "請檢查 Magnet 連結或新增更多 Tracker,然後重試"diff --git a/tests/check-third-party-notices.test.ts b/tests/check-third-party-notices.test.tsindex fd857c63..acf221ee 100644--- a/tests/check-third-party-notices.test.ts+++ b/tests/check-third-party-notices.test.ts@@ -470,9 +470,9 @@ describe('third-party graph dependency notices', () => {expect(notice).toContain('SFNS-Regular.ttf')expect(notice).toContain('https://developer.apple.com/fonts/')- expect(notice).toContain('1.37.0-motrix.15')+ expect(notice).toContain('1.37.0-motrix.16')expect(notice).toContain(- 'https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.15'+ 'https://github.com/motrixapp/aria2/tree/v1.37.0-motrix.16')expect(notice).toContain('GPL-2.0-or-later')expect(notice).toContain('THIRD_PARTY_LICENSES/aria2-COPYING')diff --git a/tests/generate-third-party-notices.test.ts b/tests/generate-third-party-notices.test.tsindex 9fc9fb4f..173784eb 100644--- a/tests/generate-third-party-notices.test.ts+++ b/tests/generate-third-party-notices.test.ts@@ -164,7 +164,7 @@ describe('third-party notice generator', () => {expect(bundle.packageCount).toBeGreaterThan(100)expect(inventory).toContain('| @xyflow/react | 12.11.6 |')- expect(inventory).toContain('| aria2 | 1.37.0-motrix.15 |')+ expect(inventory).toContain('| aria2 | 1.37.0-motrix.16 |')expect(inventory).toContain('| motrix.filename-template | 1.1.1 |')expect(inventory).toContain('Apple San Francisco tray font')expect(licenses).toContain('GNU GENERAL PUBLIC LICENSE')@@ -257,7 +257,7 @@ describe('third-party notice generator', () => {expect(licenses).toContain('GNU GENERAL PUBLIC LICENSE')}const serverInventory = server.files['THIRD_PARTY_DEPENDENCIES.md']- expect(serverInventory).toContain('| aria2 | 1.37.0-motrix.15 |')+ expect(serverInventory).toContain('| aria2 | 1.37.0-motrix.16 |')expect(serverInventory).toContain('| motrix.filename-template | 1.1.1 |')expect(serverInventory).not.toContain('| Electron |')