去掉主动创建下载目录的逻辑,解耦下载器,避免在容器环境当下载器目录与MP映射不一致时导致的目录权限异常

This commit is contained in:
Allen 2024-05-31 15:00:47 +08:00
parent 13832a51e0
commit 1b09bb8d22

View File

@ -59,8 +59,9 @@ class DirectoryHelper:
if to_path and download_path != to_path:
continue
# 不存在目录则创建
if not download_path.exists():
download_path.mkdir(parents=True, exist_ok=True)
# 注释说明MP应该和下载器解耦下载器的目录应该由下载器自己维护否则在容器环境当下载器的目录映射与MP中不一致时会导致异常
#if not download_path.exists():
# download_path.mkdir(parents=True, exist_ok=True)
# 目录类型为全部的,符合条件
if not download_dir.media_type:
return download_dir