fix: 修复firefox下载路径解析逻辑#1
Open
SurpassHR wants to merge 1 commit into
Open
Conversation
- 在 `download` 和 `send2Aria` 函数中,新增从 `downloadItem.filename` 中提取目录路径的逻辑 - 当 `filename` 包含路径分隔符(`\` 或 `/`)时,自动分离目录和文件名 - 优化路径赋值逻辑,仅在未设置 `dir` 时使用 `rpcItem.location` 作为默认目录 - 在 `BrowserCompat.hasAPI` 方法中,将 `typeof obj[part] !== 'undefined'` 检查改为更简洁的 `part in obj`
4a07f4e to
db8dd45
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当firefox捕获从文件选择框返回的文件路径时,直接把路径赋值给了文件名,导致下载时路径拼接为 默认下载路径+选择下载路径+文件名.后缀。



firefox原逻辑:
firefox现逻辑:
chrome保持不变: