mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-11 22:50:45 +08:00
🐛 修复转存目录下全为文件夹时越界报错
This commit is contained in:
parent
46ec89d201
commit
b153b2aaf6
@ -302,11 +302,11 @@ class MagicRename:
|
||||
|
||||
def set_dir_file_list(self, file_list, replace):
|
||||
"""设置目录文件列表"""
|
||||
if not file_list:
|
||||
return
|
||||
self.dir_filename_dict = {}
|
||||
filename_list = [f["file_name"] for f in file_list if not f["dir"]]
|
||||
filename_list.sort()
|
||||
if not filename_list:
|
||||
return
|
||||
if match := re.search(r"\{I+\}", replace):
|
||||
# 由替换式转换匹配式
|
||||
magic_i = match.group()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user