merge PR#612

This commit is contained in:
lededev
2021-10-15 10:07:53 +08:00
parent 317449c568
commit 416e8be351

View File

@@ -85,8 +85,8 @@ def create_folder(json_data): # 创建文件夹
if 'title' in conf.location_rule() and len(title) > maxlen:
shorttitle = title[0:maxlen]
location_rule = location_rule.replace(title, shorttitle)
path = os.path.join(success_folder, location_rule).strip()
# 当演员为空时location_rule被计算为'/number'绝对路径,导致路径连接忽略第一个路径参数,因此添加./使其始终为相对路径
path = os.path.join(success_folder, f'./{location_rule.strip()}')
if not os.path.exists(path):
path = escape_path(path, conf.escape_literals())
try: