Fix: Make progress file path respect --config-dir parameter #717
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.
问题
进度文件路径被硬编码为使用
const.ProgressPath
,不会放在通过--config-dir
参数指定的配置目录。相比之下,其他配置文件(token, settings等)都正确使用了指定目录。修改内容
__init__
方法中添加了self._progresspath
的初始化self._progresspath
替代const.ProgressPath
受影响的方法
_update_progress_entry()
_delete_progress_entry()
_upload_file_slices()
之前并发提交时遇到大文件会因为进度文件冲突报错,修改后再通过设置各自的config-dir就不会报错了。