去掉主动创建下载目录的逻辑,解耦下载器,避免在容器环境当下载器目录与MP映射不一致时导致的目录权限异常
This commit is contained in:
parent
13832a51e0
commit
1b09bb8d22
@ -59,8 +59,9 @@ class DirectoryHelper:
|
|||||||
if to_path and download_path != to_path:
|
if to_path and download_path != to_path:
|
||||||
continue
|
continue
|
||||||
# 不存在目录则创建
|
# 不存在目录则创建
|
||||||
if not download_path.exists():
|
# 注释说明:MP应该和下载器解耦,下载器的目录应该由下载器自己维护,否则在容器环境当下载器的目录映射与MP中不一致时会导致异常
|
||||||
download_path.mkdir(parents=True, exist_ok=True)
|
#if not download_path.exists():
|
||||||
|
# download_path.mkdir(parents=True, exist_ok=True)
|
||||||
# 目录类型为全部的,符合条件
|
# 目录类型为全部的,符合条件
|
||||||
if not download_dir.media_type:
|
if not download_dir.media_type:
|
||||||
return download_dir
|
return download_dir
|
||||||
|
Loading…
x
Reference in New Issue
Block a user