mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-13 15:50:45 +08:00
🐛 修复更新子目录被正则过滤 fix #6
This commit is contained in:
parent
67f5d5ef62
commit
7bbf7b55a9
@ -504,8 +504,11 @@ class Quark:
|
||||
need_save_list = []
|
||||
# 添加符合的
|
||||
for share_file in share_file_list:
|
||||
if share_file["dir"]:
|
||||
pattern, replace = task.get("update_subdir", ""), ""
|
||||
else:
|
||||
pattern, replace = magic_regex_func(task["pattern"], task["replace"])
|
||||
# 正则文件名匹配
|
||||
pattern, replace = magic_regex_func(task["pattern"], task["replace"])
|
||||
if re.search(pattern, share_file["file_name"]):
|
||||
# 替换后的文件名
|
||||
save_name = (
|
||||
@ -531,7 +534,7 @@ class Quark:
|
||||
if not file_exists:
|
||||
share_file["save_name"] = save_name
|
||||
need_save_list.append(share_file)
|
||||
elif share_file["dir"] == True:
|
||||
elif share_file["dir"]:
|
||||
# 存在并是一个文件夹
|
||||
if task.get("update_subdir", False):
|
||||
if re.search(task["update_subdir"], share_file["file_name"]):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user